{"id":14977379,"url":"https://github.com/datadistillr/datadistillr-python-sdk","last_synced_at":"2025-07-01T03:33:16.224Z","repository":{"id":39743325,"uuid":"426648926","full_name":"datadistillr/datadistillr-python-sdk","owner":"datadistillr","description":"A Python SDK for Programmatically Interacting with DataDistillr ","archived":false,"fork":false,"pushed_at":"2023-02-01T03:55:54.000Z","size":73,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T13:18:22.755Z","etag":null,"topics":["apache-drill","data","data-science","datadistillr","jupyter","sql"],"latest_commit_sha":null,"homepage":"https://www.datadistillr.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datadistillr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-10T14:16:56.000Z","updated_at":"2024-10-02T09:27:05.000Z","dependencies_parsed_at":"2023-02-17T02:00:30.931Z","dependency_job_id":null,"html_url":"https://github.com/datadistillr/datadistillr-python-sdk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/datadistillr/datadistillr-python-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadistillr%2Fdatadistillr-python-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadistillr%2Fdatadistillr-python-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadistillr%2Fdatadistillr-python-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadistillr%2Fdatadistillr-python-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datadistillr","download_url":"https://codeload.github.com/datadistillr/datadistillr-python-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datadistillr%2Fdatadistillr-python-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262888954,"owners_count":23380125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["apache-drill","data","data-science","datadistillr","jupyter","sql"],"created_at":"2024-09-24T13:55:33.608Z","updated_at":"2025-07-01T03:33:16.174Z","avatar_url":"https://github.com/datadistillr.png","language":"Python","readme":"# DataDistillr Python SDK\n\nThis library allows you to programmatically interact with DataDistillr.  It is quite simple to programmatically pull data \nfrom DataDistillr for use in machine learning. \n\n## Installing the SDK\nThe DataDistillr Python SDK is [available on Pypi](https://pypi.org/project/datadistillr/).  You can install it with pip as shown below:\n```\npip install datadistillr\n```\n\n### Methods\n#### Datadistillr\n* `get_dataframe(url, auth_token)`: Pulls your data and returns it in a Pandas DataFrame.\n* `get_csv_from_api(url, auth_token, filename)`:  Pulls your data and returns it in a CSV file.\n* `get_json_from_api(url, auth_token, filename)`:  Pulls your data and returns it in a JSON file.\n* `get_parquet_from_api(url, auth_token, filename)`:  Pulls your data and returns it in a parquet file.\n* `get_excel_from_api(url, auth_token, filename)`:  Pulls your data and returns it in an Excel file.\n* `get_dict_from_api(url, auth_token, filename)`:  Pulls your data and returns it in a Python dictionary.\n\n#### DatadistillrAccount\n* `logout()`:  Logs you out of DataDistillr account.\n* `get_projects()`:  Returns all projects in DataDistillr account as a list of Project objects.\n* `get_project_token_dict()`: Returns dictionary with project tokens as keys and project names as values.\n* `get_project_token(project_name)`: Returns project token that matches project_name\n* `get_project(project_token)`:  Returns project object identified by project_token.\n* `get_organizations()`:  Returns list organizations that DataDistillr account has access to.\n\n#### Project\nNote: A tab in the DataDistillr user interface is equivalent to a query barrel in API routes and responses. All public functions use the phrasing \"tab\" while all private functions use \"query barrel\"\n* `get_tab_token_dict()`: Returns dictionary with tab tokens as keys and tab names as values.\n* `get_tab_token(tab_name)`: Returns tab token that matches tab_name\n* `execute_existing_query(tab_token)`: Executes the most recent query in the tab identified by tab_token.\n* `execute_new_query(tab_name, query)`: Creates new tab named tab_name and executes query in new tab.\n* `get_data_source_token_dict()`: Returns dictionary with data source tokens as keys and data source names as values.\n* `get_data_source_token(data_source_name)`: Returns data source token that matches data_source_name\n* `upload_files(data_source_token, file_paths)`: Uploads files to a data source. file_paths must be a list of absolute file path strings.\n\n\n### Getting your Endpoint URL and Authorization Token\nSee https://docs.datadistillr.com/ddr/ for complete documentation on obtaining the URL and Auth Token.\n\n### Usage \nUsing the SDK in Python code is quite simple.  See the Examples below:\n\nImporting SDK\n```python\nimport datadistillr as ddr\n```\n\nGetting data from API Access Clients\n```python\nurl = \u003cYour URL From DataDistillr\u003e\nauth_token = \u003cAUTH TOKEN\u003e\ndataframe = ddr.Datadistillr.get_dataframe(url, auth_token)\n```\n\n\nLogging in to a DataDistillr Account\n```python\nemail = \u003cYour Email linked to DataDistillr Account\u003e\npassword = \u003cYour Password\u003e\n\nddr_account = ddr.DatadistillrAccount(email, password)\n```\n\nGetting a project object \n```python\nproject_name = \u003cName of project within DataDistillr Account\u003e\n\nproject_token = ddr_account.get_project_token(project_name)\nproject = ddr_account.get_project(project_token)\n```\n\nExecuting an existing query from a tab within a project\n```python\ntab_name = \u003cName of tab within project\u003e\n\ntab_token = project.get_tab_token(tab_name)\ndata_frame = project.execute_existing_query(tab_token)\n```\n\nUploading files to a data source within a project\n```python\ndata_source_name = \u003cName of data source within project\u003e\nfile_paths = \u003cList of absolute file path strings of files that you want to upload\u003e\n\ndata_source_token = project.get_data_source_token(data_source_name)\nproject.upload_files(data_source_token, file_paths)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadistillr%2Fdatadistillr-python-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatadistillr%2Fdatadistillr-python-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatadistillr%2Fdatadistillr-python-sdk/lists"}