{"id":16102556,"url":"https://github.com/abbe98/bbr-py","last_synced_at":"2025-04-06T01:12:35.404Z","repository":{"id":57414270,"uuid":"103116384","full_name":"Abbe98/bbr-py","owner":"Abbe98","description":"Python package to work with URIs from Bebyggelseregistret.","archived":false,"fork":false,"pushed_at":"2018-01-06T14:39:14.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T22:42:11.409Z","etag":null,"topics":["k-samsok","raa-collection","soch"],"latest_commit_sha":null,"homepage":null,"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/Abbe98.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":"2017-09-11T09:25:41.000Z","updated_at":"2020-11-19T16:17:20.000Z","dependencies_parsed_at":"2022-08-26T20:45:31.086Z","dependency_job_id":null,"html_url":"https://github.com/Abbe98/bbr-py","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Fbbr-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Fbbr-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Fbbr-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abbe98%2Fbbr-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abbe98","download_url":"https://codeload.github.com/Abbe98/bbr-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419871,"owners_count":20936013,"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":["k-samsok","raa-collection","soch"],"created_at":"2024-10-09T18:54:07.694Z","updated_at":"2025-04-06T01:12:35.384Z","avatar_url":"https://github.com/Abbe98.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BBR-PY\n\nA Python library to work with URIs from Bebyggelseregistret.\n\nBBR-PY can determine the item type using only its URI in 95% of all cases for the other 5% it falls back to making a HTTP lookup. BBR-PY can also get turn a local id into an Kulturarvsdata compatible URI as well as validate such.\n\n## Installation\n\n```bash\npip install bbr\n```\n\n## Usage\n\nBBR items can be of five possible types:\n\n - Building (`b`)\n - Facility (`a`)\n - Person (`p`)\n - Organization (`o`)\n - Environment (`m`)\n\n```python\nimport bbr\n\n# returns 'b', 'a', or 'm'\nbbr.get_item_type('\u003cURI\u003e')\n\n#returns True or False\nbbr.validate_uri('\u003cURI\u003e')\n\n# returns an Kulturarvsdata compatible URI as a string\nbbr.get_full_uri_from_local_id('\u003cID\u003e')\n```\n\nBBR-PY can handle all types of URIs and URLs used by kulturarvsdata.se:\n\n - `http://kulturarvsdata.se/raa/bbr/xml/16000300020896`\n - `http://kulturarvsdata.se/raa/bbr/rdf/16000300020896`\n - `http://kulturarvsdata.se/raa/bbr/html/16000300020896`\n - `http://kulturarvsdata.se/raa/bbr/jsonld/16000300020896`\n - `raa/bbr/xml/16000300020896`\n - `raa/bbr/rdf/16000300020896`\n - `raa/bbr/html/16000300020896`\n - `raa/bbr/jsonld/16000300020896`\n\nNote that MuseumDAT resource URIs/URLs isn't supported by Bebyggelseregistret.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbe98%2Fbbr-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbe98%2Fbbr-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbe98%2Fbbr-py/lists"}