{"id":37721019,"url":"https://github.com/filau/python_divia_api","last_synced_at":"2026-01-16T13:32:23.724Z","repository":{"id":52373217,"uuid":"383921787","full_name":"filau/python_divia_api","owner":"filau","description":"🇫🇷 Récupérez les horaires des prochains bus et trams Divia, et les disponibilités des DiviaVélodi, directement depuis Python !","archived":false,"fork":false,"pushed_at":"2024-01-16T21:48:40.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-25T00:34:44.165Z","etag":null,"topics":["api","bus","dijon","divia","diviavelodi","horaire","module","package","pip","pypi","python","timetable","tram","tramway","velodi"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/divia-api/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-07-07T20:51:40.000Z","updated_at":"2023-03-17T20:12:26.000Z","dependencies_parsed_at":"2024-01-17T00:38:57.016Z","dependency_job_id":"93a54262-e1da-4895-8885-b64fa577f873","html_url":"https://github.com/filau/python_divia_api","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/filau/python_divia_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filau%2Fpython_divia_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filau%2Fpython_divia_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filau%2Fpython_divia_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filau%2Fpython_divia_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filau","download_url":"https://codeload.github.com/filau/python_divia_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filau%2Fpython_divia_api/sbom","scorecard":{"id":399342,"data":{"date":"2025-08-11","repo":{"name":"github.com/filau/python_divia_api","commit":"0d17d1ca78ff0e57974bedaedd9a1843d8abbb65"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/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":"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":"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test-build.yml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/test-build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/filau/python_divia_api/test-build.yml/main?enable=pin","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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.txt:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE.txt: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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"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-18T19:45:43.068Z","repository_id":52373217,"created_at":"2025-08-18T19:45:43.068Z","updated_at":"2025-08-18T19:45:43.068Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: 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","bus","dijon","divia","diviavelodi","horaire","module","package","pip","pypi","python","timetable","tram","tramway","velodi"],"created_at":"2026-01-16T13:32:22.958Z","updated_at":"2026-01-16T13:32:23.719Z","avatar_url":"https://github.com/filau.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# «\u0026nbsp;API\u0026nbsp;» Divia\u0026nbsp;—\u0026nbsp;Python\r\n\r\nCe module servant  d’«\u0026nbsp;API\u0026nbsp;» vous permet d’accéder aux horaires des prochains bus et tram du réseau dijonnais *Divia*, en temps réel, grâce au service *TOTEM*, ainsi qu’aux disponilités en temps réels des vélos et emplacements sur les stations *DiviaVélodi*, et ce directement depuis un script Python\u0026nbsp;!  \r\nLa partie «\u0026nbsp;bus et tram\u0026nbsp;» de cette bibliothèque est très largement inspirée (aussi bien sur le principe que dans la logique et les techniques utilisées) de [**divia-api** par **@gauthier-th**](https://github.com/gauthier-th/divia-api) (en JavaScript).\r\n\r\n## Démo\r\n\r\nUne démo de l’API est disponible en cliquant ici\u0026nbsp;: [Démo](https://pda.firminlaunay.me/) (est c’est aussi [open-source](https://github.com/filau/pda_demo)\u0026nbsp;!)\r\n\r\n## Installation\r\n\r\nCette bibliothèque est disponible pour Python 3.6 et versions postérieures.  \r\n  \r\n* Depuis [PyPI](https://pypi.org), avec [pip](https://pypi.org/project/pip/)\u0026nbsp;:\r\n```\r\n$  pip install divia-api\r\n```\r\n\r\n* Manuellement, dans un dossier où vous avez décompressé [la dernière version](https://github.com/filau/python_divia_api/releases/latest) du module\u0026nbsp;:\r\n```\r\n$  python setup.py install\r\n```\r\n\r\n## Exemple d’utilisation de l’API bus et tram\r\n\r\n```python\r\nfrom divia_api import DiviaAPI\r\n\r\napi = DiviaAPI()\r\n\r\nline = api.find_line(\"T2\", 'R')  # Récupération de la ligne 2 du tram, dans la direction « R » (« A » étant la valeur par défaut).\r\nline = api.get_line(\"185\")  # Récupération de la ligne par son identifiant unique (ici le 185, qui correspond à la ligne 2 du tram, dans la direction « R ».\r\n\r\nstop = line.find_stop(\"Darcy\")  # Récupération de l’arrêt « Darcy » pour cette ligne.\r\nstop = line.get_stop(\"1494\")  # Récupération de l’arrêt « Darcy » pour cette ligne, à partir de son identifiant unique.\r\n\r\nstop = api.find_stop(\"T2\", \"Darcy\", 'R')  # Les étapes précédentes (récupération de la ligne et de l’arrêt) peuvent également être combinées.\r\n\r\ntotem_result = stop.totem()  # Interrogation du service TOTEM et récupération des prochains horaires. C’est une liste d’objets « datetime.datetime » qui est retournée par la fonction.\r\n\r\nprint(totem_result)  # Affichage du résultat.\r\n```\r\n\r\n## Exemple de l’utilisation de l’API Vélodi\r\n\r\n```python\r\nfrom divia_api import VelodiAPI\r\n\r\nvelodi_api = VelodiAPI()\r\n\r\nstation = velodi_api.find_station(\"Lycée Carnot\")  # Récupération de la station DiviaVélodi « Lycée Carnot ».\r\n\r\nstation = velodi_api.get_station(\"34\")  # Récupération d’une station par son identifiant. Ici, l’identifiant « 34 » correspond à la station « Lycée Carnot ».\r\n\r\nrealtime = station.check()  # Requête de données à jour sur la disponibilité des vélos et des emplacements dans cette station.\r\n\r\nprint(realtime.bikes, \"  \", realtime.docks)  # Affichage du résultat (nombre de vélos disponibles et nombre de places disponibles sur la station).\r\n\r\nrealtime_all_stations = velodi_api.check_multiple_stations(velodi_api.stations)  # Requête de données à jour sur l’intégralité des stations du réseau.\r\n\r\nfor station in realtime_all_stations:\r\n    print(f\"Station {station.station.code} : {station}\")  # Affichage, pour chaque station du réseau, du numéro de la station et du résultat.\r\n```\r\n\r\n## __________\r\n\r\n*Divia* est une marque déposée de *Keolis Dijon Multimodalité*. Nous ne sommes en aucun cas affiliés à *Keolis* ou à ses filiales et succursales.  \r\n  \r\nCette bibliothèque est ditribuée sous la [Licence publique générale GNU amoindrie, version 3](https://www.gnu.org/licenses/lgpl-3.0.fr.html).  \r\n© 2023, Firmin Launay ([hey@firminlaunay.me](mailto:hey@firminlaunay.me))\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilau%2Fpython_divia_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilau%2Fpython_divia_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilau%2Fpython_divia_api/lists"}