Skip to main content

Python library to authenticate with CARTO

Project description


PyPI version Tests

Python library to authenticate with CARTO.


pip install carto-auth

To install the CARTO DW extension:

pip install carto-auth[carto-dw]

Installing from source

git clone
cd carto-auth
pip install .


from carto_auth import CartoAuth

# Authentication
carto_auth = CartoAuth.from_oauth()
# carto_auth = CartoAuth.from_file("./carto_credentials.json")

# 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.


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
  • publish-test-pypi: publish package in
  • clean: remove the environment

Check the development documentation section.


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

carto-auth-0.1.0b2.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

carto_auth-0.1.0b2-py3-none-any.whl (9.1 kB view hashes)

Uploaded Python 3

Supported by

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