Skip to main content

Make connecting to the UMLS rest APIs easier

Project description

Super light UMLS connection. The goal is to feel similar to the UMLS browser. Requires no downloading, but the UMLS rest connection is somewhat slow so user beware. You need to make an account with UMLS.

import connect_umls as um
umls = um.UMLS(apikey)

Your api key can be found here: https://documentation.uts.nlm.nih.gov/rest/authentication.html You only need to supply the api key in step 1. We take care of all the ticket nonsense.

Example:

#get top 10 search results
results = umls.search("joint pain hip", k=10)

#"CUI"|"Term"|"Code" default Term. CUI - the cui. Term - the text words. Code - the code.

for result in results:
    code = result.cui() # the CUI
    name = result.name() # the main name
    synonyms = result.synonyms() # all the different names of the atoms
    if result.hasMapping("LNC"):
        # check if this result maps to a certain codeset, eg. SNOMED-CT.
        ## Note: you will need to give the UMLS short hand version of the codeset name.
        ## e.g. "LNC" not "LOINC"
        print("There is a map to LOIN-C!")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

connect_umls-0.0.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

connect_umls-0.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file connect_umls-0.0.2.tar.gz.

File metadata

  • Download URL: connect_umls-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for connect_umls-0.0.2.tar.gz
Algorithm Hash digest
SHA256 dabaff5e23f8b7131aa55f11225e320ebbc65f2cb715b7135beca44140905bf2
MD5 86cfc94b0636bdaea83c03c5cf8bb0f5
BLAKE2b-256 8a4dcb5387a39a349f71d45804862682f6d9fce4912e1b7af73ae803d5f86964

See more details on using hashes here.

File details

Details for the file connect_umls-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: connect_umls-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for connect_umls-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5d87f2cb482050c7e0b02e66f01a149d8a524e771fc25a781112247b205287c
MD5 b7f7b415b191e4941398cefd756adc78
BLAKE2b-256 9c8e4f9e059959caebb03290ed15a4e9e2436ccff02f19efd7b5767306e662c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page