{"id":17047615,"url":"https://github.com/residentmario/datafy","last_synced_at":"2025-03-23T03:44:38.921Z","repository":{"id":66134261,"uuid":"79875493","full_name":"ResidentMario/datafy","owner":"ResidentMario","description":"Tiny single-function Python module for inspecting file structure.","archived":false,"fork":false,"pushed_at":"2017-08-12T19:25:49.000Z","size":1373,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T10:25:11.452Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ResidentMario.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-24T03:38:00.000Z","updated_at":"2017-08-12T19:26:23.000Z","dependencies_parsed_at":"2023-07-08T17:01:04.806Z","dependency_job_id":null,"html_url":"https://github.com/ResidentMario/datafy","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.07407407407407407,"last_synced_commit":"dbc0d193a8c597bc784433ef04935e13856a6666"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fdatafy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fdatafy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fdatafy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ResidentMario%2Fdatafy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ResidentMario","download_url":"https://codeload.github.com/ResidentMario/datafy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052652,"owners_count":20553163,"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":[],"created_at":"2024-10-14T09:49:50.729Z","updated_at":"2025-03-23T03:44:38.897Z","avatar_url":"https://github.com/ResidentMario.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## datafy [![PyPi version](https://img.shields.io/pypi/v/datafy.svg)](https://pypi.python.org/pypi/datafy/) ![t](https://img.shields.io/badge/status-beta-yellow.svg)\n\n`datafy` is a tiny Python package that handles reading a list of files out of a number of common formats, including \nrecursively reading out the contents of a `ZIP` file.\n\n`datafy` can read data from local files:\n\n```\n\u003e\u003e\u003e from datafy import get\n\u003e\u003e\u003e get(\"file:///Desktop/myfile.csv\")\n\u003c\u003c\u003c [{'filepath': '.',\n      'mimetype': 'text/csv',\n      'extension': 'csv'}]\n```\n\nAs well as from the web:\n\n```\n\u003e\u003e\u003e get(\"https://data.cityofnewyork.us/api/geospatial/arq3-7z49?method=export\u0026format=GeoJSON\")\n\u003c\u003c\u003c [{'filepath': '.',\n      'mimetype': 'text/json',\n      'extension': 'geojson'}]\n```\n\nIt handles ZIP files as well:\n\n```\n\u003e\u003e\u003e get(\"https://data.cityofnewyork.us/download/ft4n-yqee/application%2Fzip\")\n\u003c\u003c\u003c [{'filepath': 'data.shp',\n      'mimetype': 'octet/stream',\n      'extension': 'shp'},\n     {...}]\n```\n\n### Development\n\nTo hack on `datafy`, clone this library locally. Install its dependencies (`requests`, `requests_file`, \n`python-magic`) and development dependencies (`pytest`, `requests_mock`) via `pip`. If you have `conda`, you can run \n`conda env create -f envs/devenv.yml` to do this for you.\n\nTo execute the test suite, run `pytest tests.py` on the command line from the `/tests` folder.\n\nPull requests welcome.\n\n### Limitations\n\n* Only handles archival files in the ZIP format, so no TAR files ecetera. ([#1](https://github.com/ResidentMario/datafy/issues/1)).\n* Does not handle recursively archived files ([#2](https://github.com/ResidentMario/datafy/issues/2)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresidentmario%2Fdatafy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresidentmario%2Fdatafy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresidentmario%2Fdatafy/lists"}