carto-auth


Namecarto-auth JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/cartodb/carto-auth
SummaryPython library to authenticate with CARTO
upload_time2023-06-16 07:43:43
maintainer
docs_urlNone
authorCARTO
requires_python>=3.7
licenseBSD 3-Clause
keywords carto auth oauth carto-dw bigquery
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # carto-auth

[![PyPI version](https://badge.fury.io/py/carto-auth.svg)](https://badge.fury.io/py/carto-auth)
[![PyPI downloads](https://img.shields.io/pypi/dm/carto-auth.svg)](https://pypistats.org/packages/carto-auth)
[![Tests](https://github.com/cartodb/carto-auth/actions/workflows/ci.yml/badge.svg)](https://github.com/cartodb/carto-auth/actions)

Python library to authenticate with [CARTO](carto.com).

## Install

```bash
pip install carto-auth
```

To install the CARTO DW extension:

```bash
pip install carto-auth[carto-dw]
```

### Installing from source

```bash
git clone https://github.com/cartodb/carto-auth
cd carto-auth
pip install .
```

## Usage

```py
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](./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](./docs) section.

## Contributors

- [Jesús Arroyo](https://github.com/jesus89)
- [Óscar Ramírez](https://github.com/tuxskar)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cartodb/carto-auth",
    "name": "carto-auth",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "carto,auth,oauth,carto-dw,bigquery",
    "author": "CARTO",
    "author_email": "jarroyo@carto.com",
    "download_url": "https://files.pythonhosted.org/packages/06/5b/4570c1fa7bbe63d06465fe16ed97beadf20ba95bf9f00acf6fa6462b7fca/carto-auth-0.2.0.tar.gz",
    "platform": null,
    "description": "# 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\u00fas Arroyo](https://github.com/jesus89)\n- [\u00d3scar Ram\u00edrez](https://github.com/tuxskar)\n\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "Python library to authenticate with CARTO",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/cartodb/carto-auth"
    },
    "split_keywords": [
        "carto",
        "auth",
        "oauth",
        "carto-dw",
        "bigquery"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcb2e81f8e1f8e6e925669354d3fab90a87a210bd601d0498b7aa03ecac71f0b",
                "md5": "1ce8c3fe507c79611b8ed2028f475880",
                "sha256": "bcd2012b7daf90c028127f931005e779b9461a3637a2824673dd5f0a2b1485e6"
            },
            "downloads": -1,
            "filename": "carto_auth-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1ce8c3fe507c79611b8ed2028f475880",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10011,
            "upload_time": "2023-06-16T07:43:41",
            "upload_time_iso_8601": "2023-06-16T07:43:41.652483Z",
            "url": "https://files.pythonhosted.org/packages/dc/b2/e81f8e1f8e6e925669354d3fab90a87a210bd601d0498b7aa03ecac71f0b/carto_auth-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "065b4570c1fa7bbe63d06465fe16ed97beadf20ba95bf9f00acf6fa6462b7fca",
                "md5": "800fab082f118a53e4d7fd9cfd92fa62",
                "sha256": "982d293d723e92dc334734a7be43a113dd7c8ce8c5d97b49d86c2ad81d1c63a5"
            },
            "downloads": -1,
            "filename": "carto-auth-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "800fab082f118a53e4d7fd9cfd92fa62",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8600,
            "upload_time": "2023-06-16T07:43:43",
            "upload_time_iso_8601": "2023-06-16T07:43:43.518930Z",
            "url": "https://files.pythonhosted.org/packages/06/5b/4570c1fa7bbe63d06465fe16ed97beadf20ba95bf9f00acf6fa6462b7fca/carto-auth-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-16 07:43:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cartodb",
    "github_project": "carto-auth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "carto-auth"
}
        
Elapsed time: 1.14917s