{"id":42964357,"url":"https://github.com/okfde/django-amenities","last_synced_at":"2026-01-30T23:46:00.654Z","repository":{"id":57418903,"uuid":"165848597","full_name":"okfde/django-amenities","owner":"okfde","description":"Django App to import and store OpenStreetMap nodes","archived":false,"fork":false,"pushed_at":"2025-09-17T21:40:49.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-09-22T12:51:31.355Z","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/okfde.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2019-01-15T12:39:07.000Z","updated_at":"2025-09-17T21:40:53.000Z","dependencies_parsed_at":"2022-09-13T13:40:26.397Z","dependency_job_id":null,"html_url":"https://github.com/okfde/django-amenities","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/okfde/django-amenities","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okfde%2Fdjango-amenities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okfde%2Fdjango-amenities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okfde%2Fdjango-amenities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okfde%2Fdjango-amenities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okfde","download_url":"https://codeload.github.com/okfde/django-amenities/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okfde%2Fdjango-amenities/sbom","scorecard":{"id":703982,"data":{"date":"2025-08-11","repo":{"name":"github.com/okfde/django-amenities","commit":"c351c2d571dcf81912502919016aeba325a1605a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"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":"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":"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 0/20 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":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"}}]},"last_synced_at":"2025-08-22T05:56:56.391Z","repository_id":57418903,"created_at":"2025-08-22T05:56:56.391Z","updated_at":"2025-08-22T05:56:56.391Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28923730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T22:32:35.345Z","status":"ssl_error","status_checked_at":"2026-01-30T22:32:31.927Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-30T23:46:00.015Z","updated_at":"2026-01-30T23:46:00.647Z","avatar_url":"https://github.com/okfde.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Amenities\n\nA Django app that stores OSM amenities, shops and tourism nodes for querying.\n\n\n## Django settings\n\n```python\n\nAMENITY_CATEGORY_FUNC = None\n\nAMENITY_TOPICS = {\n    \"public\": (\n      (\"building\", \"civic\"),\n      (\"building\", \"school\"),\n      (\"building\", \"government\"),\n      (\"amenity\", \"townhall\"),\n      (\"amenity\", \"library\"),\n      (\"amenity\", \"police\"),\n      (\"amenity\", \"school\"),\n      (\"amenity\", \"community_centre\"),\n      (\"amenity\", \"archive\"),\n      (\"amenity\", \"courthouse\"),\n      (\"amenity\", \"hospital\"),\n      (\"amenity\", \"public_building\"),\n      (\"office\", \"government\"),\n      (\"office\", \"administrative\"),\n      (\"government\", \"*\"),\n    ),\n}\n\n```\n\n## Prepare OSM dump for import\n\nThis is how you prepare an OSM dump for import. The example includes food-related tags and public building related tags:\n\n```bash\n# Define food related tags as a comma-separated tag-list with key.value\nFOOD_TAGS=amenity.bar,amenity.biergarten,amenity.cafe,amenity.fast_food,amenity.pub,amenity.restaurant,amenity.casino,amenity.cinema,amenity.nightclub,amenity.food_court,amenity.ice_cream,amenity.fuel,shop.alcohol,shop.bakery,shop.beverages,shop.butcher,shop.cheese,shop.chocolate,shop.coffee,shop.confectionery,shop.convenience,shop.deli,shop.dairy,shop.farm,shop.frozen_food,shop.greengrocer,shop.health_food,shop.ice_cream,shop.organic,shop.pasta,shop.pastry,shop.seafood,shop.spices,shop.tea,shop.wine,shop.water,shop.department_store,shop.general,shop.kiosk,shop.supermarket,shop.wholesale,tourism.hostel,tourism.hotel,tourism.theme_park\n\n# Download latest Germany dump from GeoFabrik (thanks GeoFabrik!)\nwget -N https://download.geofabrik.de/europe/germany-latest.osm.pbf\n\n# Convert OSM dump to nodes only with osmconvert. All non-nodes (areas, relationships) are converted to centroid node and get a new ID with big offset\nosmconvert germany-latest.osm.pbf --all-to-nodes -o=germany_nodes.pbf --max-objects=1000000000\n\nDATA_FILE=germany_nodes.pbf\n\n# Osmosis reads the new nodes-based data file and extracts the tags\n# Wildcard tags need to be extracted separately and can be combined like this\n\nosmosis \\\n--read-pbf \"$DATA_FILE\" \\\n--log-progress \\\n--node-key-value keyValueList=\"${FOOD_TAGS}\" \\\n--sort \\\n--read-pbf \"$DATA_FILE\" \\\n--log-progress \\\n--node-key-value keyValueList=\"building.public,building.civic,building.school,building.government,amenity.townhall,amenity.library,amenity.police,amenity.school,amenity.community_centre,amenity.archive,amenity.courthouse,amenity=hospital,amenity.public_building,office.government,office.administrative\" \\\n--sort \\\n--read-pbf \"$DATA_FILE\" \\\n--tf accept-nodes 'government=*' \\\n--sort \\\n--merge --merge \\\n--write-xml amenities.xml\n\n# The resulting XML file can be loaded with the update_amenities command\n# It takes a date which represents the last load date. Nodes updated after this date are also updated in the database if present.\n\npython manage.py update_amenities amenities.xml 2020-07-16\n\n```\n\n`update_amenities` works by:\n1. Getting the next higher version number (by looking at the highest existing one)\n2. Getting a list of existing OSM ids in the database\n3. Getting a list of OSM ids from the update file\n4. Getting a list of OSM ids from the update file that are updated after the given date\n5. Finding OSM ids that are present in the database but no longer present in the update (obsolete IDs)\n6. Detecting IDs of Amenity objects that have been used (e.g. referenced) by other apps (other apps indicate this by registering with the amenities registry and providing callbacks)\n7. All unused and obsolete Amenity objects are removed if the `--delete` flag is given\n8. Created all new OSM IDs that do not exist yet in the database\n9. Update existing OSM IDs that are outdated and not used\n10. Update OSM IDs that are used and need update and can be safely updated ('safely' is determined by other apps through registry callback)\n\n### OSM ID update safety\n\nOSM IDs behave like database primary keys and not like WikiData Item IDs. That means that they uniquely reference an object, but this object can be changed to represent something else (e.g. a fast food shop with an OSM ID can close and be replaced with a restaurant and have the same OSM ID). This can be good (it's a new venue in the same place), but also bad (it's not the same venue). Django apps using the OSM data can try to determine if an update is safe to apply by looking at the tags and detecting if it's still the same kind of object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokfde%2Fdjango-amenities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokfde%2Fdjango-amenities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokfde%2Fdjango-amenities/lists"}