Skip to main content

No project description provided

Project description


Python client for


pip install umls-api

Example Usage

Get CUI.

import umls_api

resp = umls_api.API(api_key='<UMLS_API_KEY_HERE>').get_cui(cui='C0007107')
	'pageCount': 1,
	'pageNumber': 1,
	'pageSize': 25,
	'result': {
		'atomCount': 247,
		'atoms': '',
		'attributeCount': 0,
		'classType': 'Concept',
		'cvMemberCount': 0,
		'dateAdded': '09-30-1990',
		'defaultPreferredAtom': '',
		'definitions': '',
		'majorRevisionDate': '06-25-2020',
		'name': 'Malignant neoplasm of larynx',
		'relationCount': 17,
		'relations': '',
		'semanticTypes': [{
			'name': 'Neoplastic Process',
			'uri': ''
		'status': 'R',
		'suppressible': False,
		'ui': 'C0007107'

Get TUI.

import umls_api

resp = umls_api.API(api_key='<UMLS_API_KEY_HERE>').get_tui(cui='T047')
	'pageCount': 1,
	'pageNumber': 1,
	'pageSize': 25,
	'result': {
		'abbreviation': 'dsyn',
		'childCount': 2,
		'classType': 'SemanticType',
		'definition': 'A condition which alters or interferes with a '
		'normal process, state, or activity of an organism. '
		'It is usually characterized by the abnormal '
		"functioning of one or more of the host's systems, "
		'parts, or organs. Included here is a complex of '
		'symptoms descriptive of a disorder.',
		'example': 'NONE',
		'name': 'Disease or Syndrome',
		'nonHuman': 'NONE',
		'semanticTypeGroup': {
			'abbreviation': 'DISO',
			'classType': 'SemanticGroup',
			'expandedForm': 'Disorders',
			'semanticTypeCount': 12
		'treeNumber': 'B2.',
		'ui': 'T047',
		'usageNote': 'Any specific disease or syndrome that is modified by '
		'such modifiers as "acute", "prolonged", etc. will '
		'also be assigned to this type. If an anatomic '
		'abnormality has a pathologic manifestation, then it '
		'will be given this type as well as a type from the '
		"'Anatomical Abnormality' hierarchy, e.g., "
		'"Diabetic Cataract" will be double-typed for this '

If you wish to add support for other API endpoints on UMLS, they are very simple to add.

Pull requests (with tests) are very welcome.

Running the tests

pip install -r requirements-dev.txt
pytest src/tests

Release History

0.1.0 (2020-12-01)

  • Initial release.

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

umls-api-0.1.0.tar.gz (4.6 kB view hashes)

Uploaded source

Supported by

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