Skip to main content

carto-auth

PyPI version PyPI downloads Tests

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

Metadata

Release files for carto-auth 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for carto-auth 0.2.0
File Size Uploaded
carto-auth-0.2.0.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for carto-auth 0.2.0
File Interpreter ABI Platform
carto_auth-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.6 kB

Release files / carto-auth-0.2.0.tar.gz

Download URL carto-auth-0.2.0.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
982d293d723e92dc334734a7be43a113dd7c8ce8c5d97b49d86c2ad81d1c63a5
BLAKE2b-256 checksum
How to use checksums
065b4570c1fa7bbe63d06465fe16ed97beadf20ba95bf9f00acf6fa6462b7fca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / carto_auth-0.2.0-py3-none-any.whl

Download URL carto_auth-0.2.0-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcd2012b7daf90c028127f931005e779b9461a3637a2824673dd5f0a2b1485e6
BLAKE2b-256 checksum
How to use checksums
dcb2e81f8e1f8e6e925669354d3fab90a87a210bd601d0498b7aa03ecac71f0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page