{"id":15060775,"url":"https://github.com/cartodb/carto-auth","last_synced_at":"2026-03-10T09:02:22.425Z","repository":{"id":59471701,"uuid":"537403084","full_name":"CartoDB/carto-auth","owner":"CartoDB","description":"Python library to authenticate with CARTO","archived":false,"fork":false,"pushed_at":"2024-12-03T14:16:49.000Z","size":62,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T07:21:56.709Z","etag":null,"topics":["auth","bigquery","carto","carto-dw","oauth"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CartoDB.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-16T10:06:12.000Z","updated_at":"2023-09-22T16:16:09.000Z","dependencies_parsed_at":"2024-09-29T06:21:18.664Z","dependency_job_id":"0d903ed1-5f0b-476c-87ba-bb0a5ee48ac6","html_url":"https://github.com/CartoDB/carto-auth","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"941a083b96d98bca98a4f7084748f4e7745e6c75"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CartoDB%2Fcarto-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CartoDB%2Fcarto-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CartoDB%2Fcarto-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CartoDB%2Fcarto-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CartoDB","download_url":"https://codeload.github.com/CartoDB/carto-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166925,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","bigquery","carto","carto-dw","oauth"],"created_at":"2024-09-24T23:04:21.346Z","updated_at":"2026-03-10T09:02:22.304Z","avatar_url":"https://github.com/CartoDB.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# carto-auth\n\n[![PyPI version](https://badge.fury.io/py/carto-auth.svg)](https://badge.fury.io/py/carto-auth)\n[![PyPI downloads](https://img.shields.io/pypi/dm/carto-auth.svg)](https://pypistats.org/packages/carto-auth)\n[![Tests](https://github.com/cartodb/carto-auth/actions/workflows/ci.yml/badge.svg)](https://github.com/cartodb/carto-auth/actions)\n\nPython library to authenticate with [CARTO](carto.com).\n\n## Install\n\n```bash\npip install carto-auth\n```\n\nTo install the CARTO DW extension:\n\n```bash\npip install carto-auth[carto-dw]\n```\n\n### Installing from source\n\n```bash\ngit clone https://github.com/cartodb/carto-auth\ncd carto-auth\npip install .\n```\n\n## Usage\n\n```py\nfrom carto_auth import CartoAuth\n\n# Authentication\ncarto_auth = CartoAuth.from_oauth()\n# carto_auth = CartoAuth.from_m2m(\"./carto_credentials.json\")\n\n# Get api base url\napi_base_url = carto_auth.get_api_base_url()\n\n# Get access token\naccess_token = carto_auth.get_access_token()\n\n# CARTO Data Warehouse\ncarto_dw_project, carto_dw_token = carto_auth.get_carto_dw_credentials()\ncarto_dw_client = carto_auth.get_carto_dw_client()\n```\n\nFor more information, check the [examples](./examples) section.\n\n## Development\n\nMake commands:\n\n- init: create the environment and install dependencies\n- lint: run linter (black + flake8)\n- test: run tests (pytest)\n- docs: build the documentation\n- publish-pypi: publish package in pypi.org\n- publish-test-pypi: publish package in test.pypi.org\n- clean: remove the environment\n\nCheck the development [documentation](./docs) section.\n\n## Contributors\n\n- [Jesús Arroyo](https://github.com/jesus89)\n- [Valentin de la Cruz](https://github.com/vdelacruzb)\n- [Óscar Ramírez](https://github.com/tuxskar)\n\n## Release\n\nThe release to PyPI requires an API token and setting the following file locally with the token: `~/.pypirc`\n\n```\n[distutils]\nindex-servers =\n    carto-auth\n\n[carto-auth]\nrepository = https://upload.pypi.org/legacy/\nusername = __token__\npassword = \u003cPyPI token\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartodb%2Fcarto-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcartodb%2Fcarto-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcartodb%2Fcarto-auth/lists"}