{"id":41294769,"url":"https://github.com/regardscitoyens/anpy","last_synced_at":"2026-01-23T04:07:53.497Z","repository":{"id":27024271,"uuid":"30488834","full_name":"regardscitoyens/anpy","owner":"regardscitoyens","description":"Python client of assemblee-nationale.fr","archived":false,"fork":false,"pushed_at":"2021-10-03T09:31:40.000Z","size":374,"stargazers_count":11,"open_issues_count":5,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-11-16T04:30:54.773Z","etag":null,"topics":["lafabriquedelaloi","parliamentary-data"],"latest_commit_sha":null,"homepage":"http://anpy.readthedocs.io/en/latest/","language":"HTML","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/regardscitoyens.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":"2015-02-08T11:18:48.000Z","updated_at":"2025-04-28T21:04:26.000Z","dependencies_parsed_at":"2022-08-27T22:01:51.443Z","dependency_job_id":null,"html_url":"https://github.com/regardscitoyens/anpy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/regardscitoyens/anpy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regardscitoyens%2Fanpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regardscitoyens%2Fanpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regardscitoyens%2Fanpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regardscitoyens%2Fanpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/regardscitoyens","download_url":"https://codeload.github.com/regardscitoyens/anpy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/regardscitoyens%2Fanpy/sbom","scorecard":{"id":768776,"data":{"date":"2025-08-11","repo":{"name":"github.com/regardscitoyens/anpy","commit":"b0eac68ed860d8a909a065c1d500ddc3f442bee7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T01:39:00.888Z","repository_id":27024271,"created_at":"2025-08-23T01:39:00.888Z","updated_at":"2025-08-23T01:39:00.888Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28679613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:02:18.746Z","status":"ssl_error","status_checked_at":"2026-01-23T04:01:41.298Z","response_time":59,"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":["lafabriquedelaloi","parliamentary-data"],"created_at":"2026-01-23T04:07:49.770Z","updated_at":"2026-01-23T04:07:53.491Z","avatar_url":"https://github.com/regardscitoyens.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ANpy: Scrape painlessly Assemblée Nationale website\n[![PyPI version](https://badge.fury.io/py/anpy.svg)](https://badge.fury.io/py/anpy)\n[![Build Status](https://travis-ci.org/regardscitoyens/anpy.svg)](https://travis-ci.org/regardscitoyens/anpy)\n[![Coverage Status](https://coveralls.io/repos/github/regardscitoyens/anpy/badge.svg?branch=master)](https://coveralls.io/github/regardscitoyens/anpy?branch=master)\n\nANpy is a python library for easily scraping data from http://assemblee-nationale.fr website\n\nForget the ugly html, just get data:\n\n    \u003e\u003e\u003e from anpy.dossier import Dossier\n    \u003e\u003e\u003e url = 'http://www.assemblee-nationale.fr/14/dossiers/republique_numerique.asp'\n    \u003e\u003e\u003e dossier = Dossier.download_and_build(url)\n    \u003e\u003e\u003e dossier.title\n    'Economie : pour une République numérique'\n    \u003e\u003e\u003e dossier.legislature\n    14\n    \u003e\u003e\u003e r.procedure\n    'PPL'\n    \u003e\u003e\u003e r.senat_url\n    'http://www.senat.fr/dossier-legislatif/pjl15-325.html'\n    \u003e\u003e\u003e r.steps\n    [{'type': 'AN_PREMIERE_LECTURE', 'acts': [...]}]\n\n\n## Supported Features\n\nANpy currently provides the following features:\n\n- Amendement parsing\n- Amendement search\n- Question parsing\n- Question search\n- Dossier parsing (two differents formats)\n- Scrutin parsing\n\nANpy supports Python 3.5.\n\n## Install :\n```bash\npip install anpy\n```\n\n## Documentation\n\nDocumentation is available at http://anpy.readthedocs.io/en/latest\n\n\n## CLI\nA script anpy-cli is installed with the package, it provides the following commands :\n\n#### Show an amendement given its url\n```bash\nanpy-cli show_amendement http://www.assemblee-nationale.fr/14/amendements/1847/CION-DVP/CD266.asp\n```\n\n#### Show amendements summaries after a given date\n```bash\nanpy-cli show_amendements_summary --start-date 2014-06-01\n```\n\n#### Print amendements order for a given id_dossier and id_examen\n```bash\nanpy-cli show_amendements_order 33299 --id-examen 4073\n```\n\n#### Show a question\n```bash\nanpy-cli show_question http://questions.assemblee-nationale.fr/q14/14-73499QE.htm\n```\n\n#### Show a law project (dossier législatif)\n\nFormat is like [senapy](https://github.com/regardscitoyens/senapy) and the Open Data of [lafabriquedelaloi.fr](https://www.lafabriquedelaloi.fr)\n\n*There's more work done on this parser to make it work across many cases*\n\n```bash\nanpy-cli parse http://www.assemblee-nationale.fr/14/dossiers/sante.asp\n[\n    {\n        \"assemblee_id\": \"14-sante\",\n        \"assemblee_legislature\": 14,\n        \"assemblee_slug\": \"sante\",\n        \"beginning\": \"2014-10-15\",\n        \"long_title\": \"Questions sociales et santé : modernisation de notre système de santé\",\n        \"steps\": [\n            {\n                \"date\": \"2014-10-15\",\n                \"institution\": \"assemblee\",\n                \"source_url\": \"http://www.assemblee-nationale.fr/14/projets/pl2302.asp\",\n                \"stage\": \"1ère lecture\",\n                \"step\": \"depot\"\n            },\n            {\n                \"date\": \"2015-03-20\",\n                \"institution\": \"assemblee\",\n                \"source_url\": \"http://www.assemblee-nationale.fr/14/ta-commission/r2673-a0.asp\",\n                \"stage\": \"1ère lecture\",\n                \"step\": \"commission\"\n            },\n            {\n                \"date\": \"2015-04-14\",\n                \"institution\": \"assemblee\",\n                \"source_url\": \"http://www.assemblee-nationale.fr/14/ta/ta0505.asp\",\n                \"stage\": \"1ère lecture\",\n                \"step\": \"hemicycle\"\n            },\n...\n```\n\nFeatures:\n- Merging the law project across legislatures\n- Parse from Open Data when available or fallback to scraping HTML\n- Returns an array of law projects since a page can contains many law projects (ex: organic + non-organic)\n\n\nYou can also parse many of them by giving a list of urls:\n\n```bash\nanpy-cli doslegs_urls | anpy-cli parse_many an_doslegs/\n```\n\n#### Show a law project (with a format is similar to the AN Open Data)\n\n*This parser is still a work-in-progress*\n\n```bash\nanpy-cli show_dossier http://www.assemblee-nationale.fr/14/dossiers/sante.asp\n{\n    \"legislature\": \"14\",\n    \"procedure\": \"PJL\",\n    \"senat_url\": \"http://www.senat.fr/dossier-legislatif/pjl14-406.html\",\n    \"steps\": [\n        {\n            \"acts\": [\n                {\n                    \"date\": \"2014-10-15T00:00:00\",\n                    \"type\": \"DEPOT_INITIATIVE\",\n                    \"url\": \"http://www.assemblee-nationale.fr/14/projets/pl2302.asp\"\n                },\n                {\n                    \"type\": \"ETUDE_IMPACT\",\n                    \"url\": \"http://www.assemblee-nationale.fr/14/projets/pl2302-ei.asp\"\n                },\n                {\n                    \"date\": \"2015-03-16T00:00:00\",\n                    \"type\": \"PROCEDURE_ACCELEREE\"\n                },\n                {\n                    \"date\": \"2015-03-20T00:00:00\",\n                    \"type\": \"DEPOT_RAPPORT\",\n                    \"url\": \"http://www.assemblee-nationale.fr/14/rapports/r2673.asp\"\n                },\n                {\n                    \"date\": \"2015-03-24T00:00:00\",\n                    \"type\": \"TEXTE_COMMISSION\",\n                    \"url\": \"http://www.assemblee-nationale.fr/14/ta-commission/r2673-a0.asp\"\n                },\n                {\n                    \"date\": \"2015-02-11T00:00:00\",\n                    \"type\": \"DEPOT_RAPPORT\",\n                    \"url\": \"http://www.assemblee-nationale.fr/14/rap-info/i2581.asp\"\n                },\n                {\n...\n```\n\n\n#### Find all the dossier urls\n```bash\nanpy-cli doslegs_urls\n```\n\n#### Show a scrutin\n```bash\nanpy-cli show_scrutin http://www2.assemblee-nationale.fr/scrutins/detail/(legislature)/14/(num)/1212\n```\n\n#### Parse the scrutins table\n\n*Format is one JSON per line*\n\n```bash\nanpy-cli scrutins\n```\n\n\n#### Find all the videos (seance and commission)\n\n*Format is one JSON per line*\n\n```bash\nanpy-cli videos\n```\n\n\n## Running the tests\n\n```bash\npip install -U -r test_requirements.txt\npip install -e .\npycodestyle --exclude=tests,docs .\nflake8 --exclude=tests,docs .\npy.test --cov=anpy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregardscitoyens%2Fanpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fregardscitoyens%2Fanpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fregardscitoyens%2Fanpy/lists"}