{"id":20506308,"url":"https://github.com/felipensp/python-etl","last_synced_at":"2026-05-01T06:33:10.590Z","repository":{"id":146715052,"uuid":"331752658","full_name":"felipensp/python-etl","owner":"felipensp","description":"ETL tool written in Python that provides an specific DSL which is translated to Python script to handle input data ","archived":false,"fork":false,"pushed_at":"2021-02-22T15:59:21.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T10:10:39.006Z","etag":null,"topics":["csv","etl","json","parsing","python","regex","scripting","sql"],"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/felipensp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-21T20:55:17.000Z","updated_at":"2021-02-22T15:59:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"da1ab217-54f5-4cd1-bf7c-ea7346635320","html_url":"https://github.com/felipensp/python-etl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/felipensp/python-etl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipensp%2Fpython-etl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipensp%2Fpython-etl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipensp%2Fpython-etl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipensp%2Fpython-etl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felipensp","download_url":"https://codeload.github.com/felipensp/python-etl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felipensp%2Fpython-etl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["csv","etl","json","parsing","python","regex","scripting","sql"],"created_at":"2024-11-15T19:55:58.897Z","updated_at":"2026-05-01T06:33:10.575Z","avatar_url":"https://github.com/felipensp.png","language":"Python","readme":"# python-etl\nETL tool written in Python that provides an specific DSL which is translated to Python script to handle input data.\n\n## DSL\n\n```\n/(pattern)/ {\n    // Python code to run when pattern matches\n    // We can use $1, $2, $N to refer to the matching group\n}\n\nor\n\n\u003ccsv\u003e {\n    // Python code to run on every csv row\n    // We can use $0, $1, $N to refer to csv column index\n}\n```\n\n# Examples\n\n#### ETL file\n\n```\nresult = []\n/(?m:^)(\\d{3})-([a-z]+)/ {\n    result.append({\"number\": int($1), \"description\": 'good' if $2 == 'foo' else 'bad'})\n}\n/(\\d+)/ {\n    result.append({\"number\": int($1)})\n}\nprint(result)\n```\n\n### Using stdin in command-line\n\n```\n\u003epython python-etl.py test.etl\n123\n^Z\n[{'number': 123}]\n```\n\n```\n\u003epython python-etl.py test.etl\n123-foo\n^Z\n[{'number': 123, 'description': 'good'}, {'number': 123}]\n```\n\n### Using payload input file\n\n```\n\u003etype test\\payload | python python-etl.py test.etl\n[{'number': 123, 'description': 'good'}, {'number': 1337}, {'number': 123}, {'number': 456}, {'number': 777}]\n```\n\n## Processing CSV file\n\n#### ETL file\n```\n\u003ccsv\u003e {\n   print($1)\n}\n```\n\n### Testing in command line\n\n```\n\u003e python python-etl.py csv.etl\nid,name\n1,felipe\n^Z\nname\nfelipe\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipensp%2Fpython-etl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelipensp%2Fpython-etl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelipensp%2Fpython-etl/lists"}