{"id":34039876,"url":"https://github.com/wchatx/direct-access-py","last_synced_at":"2026-03-27T02:45:49.200Z","repository":{"id":44535814,"uuid":"153306529","full_name":"wchatx/direct-access-py","owner":"wchatx","description":"Enverus Drillinginfo Direct Access Developer API Python Client","archived":false,"fork":false,"pushed_at":"2022-02-09T11:50:47.000Z","size":1106,"stargazers_count":36,"open_issues_count":0,"forks_count":27,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-01-02T12:34:24.895Z","etag":null,"topics":["api","data","drillinginfo","enverus","gas","oil","python"],"latest_commit_sha":null,"homepage":"https://direct-access-py.readthedocs.io/en/stable/api.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wchatx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-16T15:09:29.000Z","updated_at":"2025-05-10T17:16:59.000Z","dependencies_parsed_at":"2022-09-08T06:01:44.430Z","dependency_job_id":null,"html_url":"https://github.com/wchatx/direct-access-py","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/wchatx/direct-access-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wchatx%2Fdirect-access-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wchatx%2Fdirect-access-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wchatx%2Fdirect-access-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wchatx%2Fdirect-access-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wchatx","download_url":"https://codeload.github.com/wchatx/direct-access-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wchatx%2Fdirect-access-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","data","drillinginfo","enverus","gas","oil","python"],"created_at":"2025-12-13T21:54:45.900Z","updated_at":"2026-03-27T02:45:49.193Z","avatar_url":"https://github.com/wchatx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# direct-access-py\n![directaccess](https://github.com/wchatx/direct-access-py/workflows/directaccess/badge.svg)\n[![PyPI version](https://badge.fury.io/py/directaccess.svg)](https://badge.fury.io/py/directaccess) \n\nA thin wrapper around Drillinginfo's Direct Access API. Handles authentication and token management, pagination and\nnetwork-related error handling/retries.  \n\nThis module is built and tested on Python 3.6 but should work on Python 2.7 and up.\n\n\n## Install\n```commandline\npip install directaccess\n```\n\n## Usage\n\n### Direct Access Version 1 (deprecated)\nVersion 1 of the API has been deprecated and removed.\n\n### Direct Access Version 2\nFor version 2 of the API, create an instance of the DirectAccessV2 class, providing it your API key, client id and client secret.\nThe returned access token will be available as an attribute on the instance (d2.access_token) and the Authorization\nheader is set automatically\n```python\nfrom directaccess import DirectAccessV2\n\nd2 = DirectAccessV2(\n    api_key='\u003cyour-api-key\u003e',\n    client_id='\u003cyour-client-id\u003e',\n    client_secret='\u003cyour-client-secret\u003e',\n)\n```\n\nProvide the query method the dataset and query params. All query parameters must match the valid\nparameters found in the Direct Access documentation and be passed as keyword arguments.\n```python\nfor row in d2.query('well-origins', county='REEVES', pagesize=10000):\n    print(row)\n```\n\n### Filter functions\nDirect Access version 2 supports filter funtions. These can be passed as strings on the keyword arguments.\n\nSome common filters are greater than (`gt()`), less than (`lt()`), null, not null (`not(null)`) and between (`btw()`).  \nSee the Direct Access documentation for a list of all available filters.\n\n```python\n# Get well records updated after 2018-08-01 and without deleted dates\nfor row in d2.query('well-origins', updateddate='gt(2018-08-01)', deleteddate='null'):\n    print(row)\n    \n# Get permit records with approved dates between 2018-03-01 and 2018-06-01\nfor row in d2.query('permits', approveddate='btw(2018-03-01,2018-06-01)'):\n    print(row) \n```\n\nYou can use the `fields` keyword to limit the returned fields in your request.\n```python\nfor row in d2.query('rigs', fields='DrillType,LeaseName,PermitDepth'):\n    print(row)\n\n```\n\n### Escaping\nWhen making requests containing certain characters like commas, use a backslash to escape them.  \n```python\n# Escaping the comma before LLC\nfor row in d2.query('producing-entities', curropername='PERCUSSION PETROLEUM OPERATING\\, LLC'):\n    print(row)\n\n```\n\n### Network request handling\nThis module exposes functionality in python-requests for modifying network requests handling, namely:\n* retries and backoff\n* network proxies\n* ssl verification\n\n#### Retries and backoff\nSpecify the number of retry attempts in `retries` and the backoff factor in `backoff_factor`. See the urllib3\n[Retry](https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.Retry) utility API for more info\n```python\nfrom directaccess import DirectAccessV2\n\nd2 = DirectAccessV2(\n    api_key='\u003cyour-api-key\u003e',\n    client_id='\u003cyour-client-id\u003e',\n    client_secret='\u003cyour-client-secret\u003e',\n    retries=5,\n    backoff_factor=1\n)\n```\n\nYou can specify a network proxy by passing a dictionary with the host and port of your proxy to `proxies`. See the\n[proxies](https://requests.readthedocs.io/en/master/user/advanced/#proxies) section of the python-requests documentation\nfor more info.\n```python\nfrom directaccess import DirectAccessV2\n\nd2 = DirectAccessV2(\n    api_key='\u003cyour-api-key\u003e',\n    client_id='\u003cyour-client-id\u003e',\n    client_secret='\u003cyour-client-secret\u003e',\n    proxies={'https': 'http://10.10.1.10:1080'}\n)\n```\n\nFinally, if you're in an environment that provides its own SSL certificates that might not be in your trusted store,\nyou can choose to ignore SSL verification altogether. This is typically not a good idea and you should seek to resolve\ncertificate errors instead of ignore them.\n```python\nfrom directaccess import DirectAccessV2\n\nd2 = DirectAccessV2(\n    api_key='\u003cyour-api-key\u003e',\n    client_id='\u003cyour-client-id\u003e',\n    client_secret='\u003cyour-client-secret\u003e',\n    verify=False\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwchatx%2Fdirect-access-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwchatx%2Fdirect-access-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwchatx%2Fdirect-access-py/lists"}