{ "info": { "author": "emredjan", "author_email": "emredjan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Office/Business :: Financial" ], "description": "# LEIPY\n\nA python wrapper / client for GLEIF public API. Suggestions, requests, contributions welcome.\n\n(I started this as a hobby / learning project, so it's rough around the edges. If you are looking for a better solution, check out [pygleif](https://github.com/ggravlingen/pygleif))\n\n## Dependencies\n\n1. Python >= 3.4\n2. [requests](http://docs.python-requests.org/en/master/): For API requests\n3. [dateutil](https://dateutil.readthedocs.io/en/stable/): For correctly parsing dates as datetime objects\n4. [pandas](https://pandas.pydata.org/): Optional, for returning output as DataFrame \n\n## Usage\n\nImport, instantiate and make the request:\n\n```python\nfrom leipy import GLEIF\n\ngleif = GLEIF(api_version='v1')\n\nraw_output, results, results_df = gleif.request(\n ['HWUPKR0MPOU8FGXBT394','7ZW8QJWVPR4P1J1KQY45'], \n return_dataframe=True\n)\n```\n\nAfter that, you can access the raw output from the API, results as a class with easy to access instance members, and results as a pandas DataFrame\n\n#### Raw output example\n\n```python\n[{'LEI': {'$': 'HWUPKR0MPOU8FGXBT394'},\n 'Entity': {'LegalName': {'$': 'Apple Inc.'},\n 'LegalAddress': {'Line1': {'$': 'C/O C T Corporation System'},\n 'Line2': {'$': '818 West 7th Street'},\n 'Line3': {'$': 'Suite 930'},\n 'City': {'$': 'Los Angeles'},\n 'Region': {'$': 'US-CA'},\n 'Country': {'$': 'US'},\n 'PostalCode': {'$': '90017'}},\n 'HeadquartersAddress': {'Line1': {'$': '1 Infinite Loop'},\n 'City': {'$': 'Cupertino'},\n 'Region': {'$': 'US-CA'},\n 'Country': {'$': 'US'},\n 'PostalCode': {'$': '95014'}},\n 'BusinessRegisterEntityID': {'@register': 'RA000598', '$': 'C0806592'},\n 'LegalJurisdiction': {'$': 'US'},\n 'LegalForm': {'$': 'INCORPORATED'},\n 'EntityStatus': {'$': 'ACTIVE'}},\n 'Registration': {'InitialRegistrationDate': {'$': '2012-06-06T15:53:00.000Z'},\n 'LastUpdateDate': {'$': '2017-12-12T21:19:00.000Z'},\n 'RegistrationStatus': {'$': 'ISSUED'},\n 'NextRenewalDate': {'$': '2018-12-13T00:31:00.000Z'},\n 'ManagingLOU': {'$': 'EVK05KS7XY1DEII3R011'},\n 'ValidationSources': {'$': 'FULLY_CORROBORATED'}}},\n {'LEI': {'$': '7ZW8QJWVPR4P1J1KQY45'},\n 'Entity': {'LegalName': {'$': 'Google LLC'},\n 'LegalAddress': {'Line1': {'$': 'C/O Corporation Service Company'},\n 'Line2': {'$': '251 Little Falls Drive'},\n 'City': {'$': 'Wilmington'},\n 'Region': {'$': 'US-DE'},\n 'Country': {'$': 'US'},\n 'PostalCode': {'$': '19808'}},\n 'HeadquartersAddress': {'Line1': {'$': '1600 Amphitheatre Parkway'},\n 'City': {'$': 'Mountain View'},\n 'Region': {'$': 'US-CA'},\n 'Country': {'$': 'US'},\n 'PostalCode': {'$': '94043'}},\n 'BusinessRegisterEntityID': {'@register': 'RA000602', '$': '3582691'},\n 'LegalJurisdiction': {'$': 'US'},\n 'LegalForm': {'$': 'LIMITED LIABILITY COMPANY'},\n 'EntityStatus': {'$': 'ACTIVE'}},\n 'Registration': {'InitialRegistrationDate': {'$': '2012-06-06T15:52:00.000Z'},\n 'LastUpdateDate': {'$': '2018-03-28T17:00:00.000Z'},\n 'RegistrationStatus': {'$': 'ISSUED'},\n 'NextRenewalDate': {'$': '2018-08-17T18:10:00.000Z'},\n 'ManagingLOU': {'$': 'EVK05KS7XY1DEII3R011'},\n 'ValidationSources': {'$': 'FULLY_CORROBORATED'}}}]\n```\n\n#### Results class example\n\n```python\n>>> print(results.legal_name)\n['Apple Inc.', 'Google LLC']\n\n>>> print(results.lei_reg_status)\n['ISSUED', 'ISSUED']\n\n>>> print(results.date_last_updated)\n[datetime.datetime(2017, 12, 12, 21, 19, tzinfo=tzutc()),\n datetime.datetime(2018, 3, 28, 17, 0, tzinfo=tzutc())]\n```\n\n#### Results DataFrame example\n\n```python\n>>>results_df\n```\n\n| |country_hq|country_legal|date_initial_reg|date_last_updated|date_next_renewal|legal_name|lei|lei_reg_status|status|\n|-|----------|-------------|----------------|-----------------|-----------------|----------|---|--------------|------|\n|0\t|US\t|US\t|2012-06-06 15:53:00+00:00\t|2017-12-12 21:19:00+00:00\t|2018-12-13 00:31:00+00:00\t|Apple Inc.\t|HWUPKR0MPOU8FGXBT394\t|ISSUED\t|ACTIVE|\n|1\t|US\t|US\t|2012-06-06 15:52:00+00:00\t|2018-03-28 17:00:00+00:00\t|2018-08-17 18:10:00+00:00\t|Google LLC\t|7ZW8QJWVPR4P1J1KQY45\t|ISSUED\t|ACTIVE|\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/emredjan/leipy", "keywords": "lei gleif api api-wrapper", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "leipy", "package_url": "https://pypi.org/project/leipy/", "platform": "", "project_url": "https://pypi.org/project/leipy/", "project_urls": { "Homepage": "https://github.com/emredjan/leipy" }, "release_url": "https://pypi.org/project/leipy/0.1.0/", "requires_dist": [ "requests", "python-dateutil" ], "requires_python": ">=3.4", "summary": "A python wrapper / client for GLEIF public API.", "version": "0.1.0" }, "last_serial": 3778095, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "e5d65d27d88d1951793b7ace8e4652a5", "sha256": "3bf9da54908a2614157056edcf40775cbfdf576c083ca73be48f13f4cd8ea6cd" }, "downloads": -1, "filename": "leipy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e5d65d27d88d1951793b7ace8e4652a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5468, "upload_time": "2018-04-18T18:31:47", "url": "https://files.pythonhosted.org/packages/98/c7/efb1725c16d12229af7d59cc03d7c3c8512de142d5fc8b4edab435d8244c/leipy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04fb9d380bcf4b5fc24c3b1cb7d59d06", "sha256": "50ce69046462321f35d3fe02fe2f1a5918d1fe6e8e19155a7652d6546ff414b1" }, "downloads": -1, "filename": "leipy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "04fb9d380bcf4b5fc24c3b1cb7d59d06", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4760, "upload_time": "2018-04-18T18:31:48", "url": "https://files.pythonhosted.org/packages/42/a8/33d759069dbef43a5f0e0221b1f75dd301c114445a90159e83019d0e56ec/leipy-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e5d65d27d88d1951793b7ace8e4652a5", "sha256": "3bf9da54908a2614157056edcf40775cbfdf576c083ca73be48f13f4cd8ea6cd" }, "downloads": -1, "filename": "leipy-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e5d65d27d88d1951793b7ace8e4652a5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 5468, "upload_time": "2018-04-18T18:31:47", "url": "https://files.pythonhosted.org/packages/98/c7/efb1725c16d12229af7d59cc03d7c3c8512de142d5fc8b4edab435d8244c/leipy-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04fb9d380bcf4b5fc24c3b1cb7d59d06", "sha256": "50ce69046462321f35d3fe02fe2f1a5918d1fe6e8e19155a7652d6546ff414b1" }, "downloads": -1, "filename": "leipy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "04fb9d380bcf4b5fc24c3b1cb7d59d06", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 4760, "upload_time": "2018-04-18T18:31:48", "url": "https://files.pythonhosted.org/packages/42/a8/33d759069dbef43a5f0e0221b1f75dd301c114445a90159e83019d0e56ec/leipy-0.1.0.tar.gz" } ] }