Skip to main content

Open source python library for accessing BRO API

Project description

BRO

This package can access the REST API from the BRO. Currently, this package provides functionality to request CPTs from the BRO when you provide a region of interest. The format is based on the REST API of the BRO, which is described here for CPTs.

Current options include retrieval of the following objects:

  1. CPTs (format: bytes, dict)

The package also allows export of the retrieved data in GeoJSON format.

Note 1: The BRO is only available for the Netherlands, other locations are not supported.

Note 2: The API of the BRO is limited and requesting large amounts of data may result in instability.

Installation

pip install bro

Use

Example usage to retrieve CPTs from the BRO as dictionaries.

from datetime import datetime

import Envelope
import Point
import get_cpt_characteristics_and_return_cpt_objects

begin_date = datetime(2015, 1, 1).strftime("%Y-%m-%d")
end_date = datetime(2023, 3, 3).strftime("%Y-%m-%d")

# Define small square area that returns 5 valid cpts
lower_corner = Point(51.92269686635185, 4.469594207611851)
upper_corner = Point(51.923034432171065, 4.470094707426648)

area = Envelope(lower_corner, upper_corner)
cpts = get_cpt_characteristics_and_return_cpt_objects(begin_date, end_date, area, as_dict= True)

LICENSE

MIT License

Copyright (c) 2023 VIKTOR

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Publish

  • update changelog with version number
  • update bro/version.py
  • tag with version number

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bro-0.2.3.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bro-0.2.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file bro-0.2.3.tar.gz.

File metadata

  • Download URL: bro-0.2.3.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for bro-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6c9345fc6ae1c4ef28d372d9d513eb22c97a833e6925e5def02281a1e95ddc8d
MD5 36a7879fb329209f9f44d2051b65db9d
BLAKE2b-256 a63e017f3a92d85732e51eb396e26d91d6e8eaed2d0bb1bfd1c7ae9ef981cb19

See more details on using hashes here.

File details

Details for the file bro-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: bro-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for bro-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c5c7715b181d11526abc13da8ee1b6b6465df6bb8a91345b6ca57c3fcf1ff624
MD5 a27b0b39a287d08ab3bc536dcd6225f1
BLAKE2b-256 6435ca6313cda18a6b2dd98c6d7aa0b48a433c2e69be9c6fd3915e17abd4ab28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page