prefixcommons


Nameprefixcommons JSON
Version 0.1.12 PyPI version JSON
download
home_pagehttps://github.com/prefixcommons/prefixcommons-py
SummaryA python API for working with ID prefixes
upload_time2022-07-19 00:06:12
maintainer
docs_urlNone
authorcmungall
requires_python>=3.7,<4.0
license
keywords ontology graph obo owl sparql networkx network
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            prefixcommons
=============

A python API for working with ID prefixes in the context of
`prefixcommons <http://prefixcommons.org>`__

Current functionality: Uses JSON-LD contexts to expand and contract
CURIEs to URIs

E.g. GO:0008150 <=> http://purl.obolibrary.org/obo/GO\_0008150

Example
=======

::
   
   >>> from prefixcommons import contract_uri
   >>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'))
   ['GO:0008150']
   
   >>> from prefixcommons import expand_uri
   >>> print(expand_uri('GO:000850'))
   http://purl.obolibrary.org/obo/GO_0008150

The above uses standard JSON-LD context files from 
`prefixcommons/biocontext <https://github.com/prefixcommons/biocontext>`__

You can pass your own

::

   >>> cmaps = [{'GO': 'http://purl.obolibrary.org/obo/GO_'}]
   >>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'), cmaps)
   ['GO:0008150']


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/prefixcommons/prefixcommons-py",
    "name": "prefixcommons",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "ontology,graph,obo,owl,sparql,networkx,network",
    "author": "cmungall",
    "author_email": "cjm@berkeleybop.org",
    "download_url": "https://files.pythonhosted.org/packages/7d/b5/c5b63a4bf5dedb36567181fdb98dbcc7aaa025faebabaaffa2f5eb4b8feb/prefixcommons-0.1.12.tar.gz",
    "platform": null,
    "description": "prefixcommons\n=============\n\nA python API for working with ID prefixes in the context of\n`prefixcommons <http://prefixcommons.org>`__\n\nCurrent functionality: Uses JSON-LD contexts to expand and contract\nCURIEs to URIs\n\nE.g. GO:0008150 <=> http://purl.obolibrary.org/obo/GO\\_0008150\n\nExample\n=======\n\n::\n   \n   >>> from prefixcommons import contract_uri\n   >>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'))\n   ['GO:0008150']\n   \n   >>> from prefixcommons import expand_uri\n   >>> print(expand_uri('GO:000850'))\n   http://purl.obolibrary.org/obo/GO_0008150\n\nThe above uses standard JSON-LD context files from \n`prefixcommons/biocontext <https://github.com/prefixcommons/biocontext>`__\n\nYou can pass your own\n\n::\n\n   >>> cmaps = [{'GO': 'http://purl.obolibrary.org/obo/GO_'}]\n   >>> print(contract_uri('http://purl.obolibrary.org/obo/GO_0008150'), cmaps)\n   ['GO:0008150']\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python API for working with ID prefixes",
    "version": "0.1.12",
    "split_keywords": [
        "ontology",
        "graph",
        "obo",
        "owl",
        "sparql",
        "networkx",
        "network"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31e8715b09df3dab02b07809d812042dc47a46236b5603d9d3a2572dbd1d8a97",
                "md5": "8160110bfca4eb56bd696c68722f7e06",
                "sha256": "16dbc0a1f775e003c724f19a694fcfa3174608f5c8b0e893d494cf8098ac7f8b"
            },
            "downloads": -1,
            "filename": "prefixcommons-0.1.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8160110bfca4eb56bd696c68722f7e06",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 29482,
            "upload_time": "2022-07-19T00:06:08",
            "upload_time_iso_8601": "2022-07-19T00:06:08.709698Z",
            "url": "https://files.pythonhosted.org/packages/31/e8/715b09df3dab02b07809d812042dc47a46236b5603d9d3a2572dbd1d8a97/prefixcommons-0.1.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7db5c5b63a4bf5dedb36567181fdb98dbcc7aaa025faebabaaffa2f5eb4b8feb",
                "md5": "c5b3a8c6ba35bd08c44d2e878959359c",
                "sha256": "22c4e2d37b63487b3ab48f0495b70f14564cb346a15220f23919eb0c1851f69f"
            },
            "downloads": -1,
            "filename": "prefixcommons-0.1.12.tar.gz",
            "has_sig": false,
            "md5_digest": "c5b3a8c6ba35bd08c44d2e878959359c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 24063,
            "upload_time": "2022-07-19T00:06:12",
            "upload_time_iso_8601": "2022-07-19T00:06:12.478623Z",
            "url": "https://files.pythonhosted.org/packages/7d/b5/c5b63a4bf5dedb36567181fdb98dbcc7aaa025faebabaaffa2f5eb4b8feb/prefixcommons-0.1.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-07-19 00:06:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "prefixcommons",
    "github_project": "prefixcommons-py",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "prefixcommons"
}
        
Elapsed time: 0.10560s