Skip to main content

BPS Geodatabase - API Authorization and Access Python Modules

Project description

bpsgeodb

BPS Geodatabase - API Authorization and Access Python Modules

The objective of this module is to facilitate the authorization flow in our API. More information about the API you can find in the DEVELOPER DOCS section of the BPS Geodatabase.

Installation

pip install bspgeodb

Code Example

import bpsgeodb
import pathlib
import dotenv

from pprint import pprint

# Access to the API requires authorization.
# You must set up all necessary environment variables for the Authorization
# to work. Optionally you may read the environment variables from .env file.
# ATTENTION: Make sure you do not add your API KEYS to any code repository.

env_path = pathlib.Path('.') / '.env'
dotenv.load_dotenv(dotenv_path=env_path)

# create a BPS Geodb API Service instance
api = bpsgeodb.ApiService()

# Start authorization
api.authorize()

# Get all wells with Oil Geochemistry data
data = api.getData("oil_geochemistry/wells")

# Print API response
pprint(data)

Project details


Download files

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

Files for bpsgeodb, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size bpsgeodb-0.0.5-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size bpsgeodb-0.0.5.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page