carto-auth
Python library to authenticate with CARTO.
Install
pip install carto-auth
To install the CARTO DW extension:
pip install carto-auth[carto-dw]
Installing from source
git clone https://github.com/cartodb/carto-auth
cd carto-auth
pip install .
Usage
from carto_auth import CartoAuth
# Authentication
carto_auth = CartoAuth.from_oauth()
# carto_auth = CartoAuth.from_m2m("./carto_credentials.json")
# Get api base url
api_base_url = carto_auth.get_api_base_url()
# Get access token
access_token = carto_auth.get_access_token()
# CARTO Data Warehouse
carto_dw_project, carto_dw_token = carto_auth.get_carto_dw_credentials()
carto_dw_client = carto_auth.get_carto_dw_client()
For more information, check the examples section.
Development
Make commands:
- init: create the environment and install dependencies
- lint: run linter (black + flake8)
- test: run tests (pytest)
- docs: build the documentation
- publish-pypi: publish package in pypi.org
- publish-test-pypi: publish package in test.pypi.org
- clean: remove the environment
Check the development documentation section.
Contributors
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
carto-auth-0.2.0.tar.gz
(8.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file carto-auth-0.2.0.tar.gz.
File metadata
- Download URL: carto-auth-0.2.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
982d293d723e92dc334734a7be43a113dd7c8ce8c5d97b49d86c2ad81d1c63a5
|
|
| MD5 |
800fab082f118a53e4d7fd9cfd92fa62
|
|
| BLAKE2b-256 |
065b4570c1fa7bbe63d06465fe16ed97beadf20ba95bf9f00acf6fa6462b7fca
|
File details
Details for the file carto_auth-0.2.0-py3-none-any.whl.
File metadata
- Download URL: carto_auth-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcd2012b7daf90c028127f931005e779b9461a3637a2824673dd5f0a2b1485e6
|
|
| MD5 |
1ce8c3fe507c79611b8ed2028f475880
|
|
| BLAKE2b-256 |
dcb2e81f8e1f8e6e925669354d3fab90a87a210bd601d0498b7aa03ecac71f0b
|