Skip to content
Advertisement

Tag: uri

How to read URIs from RDFLib using Python?

I have several thousands URIRef ontology values that I’m trying to get a string representation of: I could go to each one’s link individually (eg http://purl.obolibrary.org/obo/RO_0002219) and get it (e.g surrounded by), but how can I do it with Python? There are 2 ways that I see how to do it but I couldn’t figure out either. One way would

Database connection string parsing in python

Given a database connection string structure (such like one you can find here) what’s the best way to parse a real URI string and get their component like user, password, database name and host? Thank you very much Answer There is a Python library for that: python 2: urlparse python 3: urllib.parse

Advertisement