Python library to authenticate with CARTO
Project Links
Meta
Author: CARTO
Requires Python: >=3.7
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
License
- OSI Approved :: BSD License
Natural Language
- English
Programming Language
- Python :: 3
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
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
Jun 16, 2023
0.2.0
Nov 04, 2022
0.1.0
Nov 03, 2022
0.1.0b5
Oct 18, 2022
0.1.0b4
Oct 13, 2022
0.1.0b3
Oct 13, 2022
0.1.0b3.dev0
Sep 28, 2022
0.1.0b2
Sep 16, 2022
0.1.0b1