pydeck-carto
Pydeck wrapper for use with CARTO.
Install
pip install pydeck-carto
This also ensures pydeck is installed. If you haven't previously enabled pydeck to be used with Jupyter, follow its instructions to install.
Installing from source
git clone https://github.com/visgl/deck.gl
cd deck.gl/bindings/pydeck-carto
pip install .
Usage
import pydeck as pdk
import pydeck_carto as pdkc
from carto_auth import CartoAuth
# Authentication with CARTO
carto_auth = CartoAuth.from_oauth()
# Register new layer types in pydeck
pdkc.register_layers()
# Create CARTO data source
data = pdkc.sources.vector_query_source(
access_token=carto_auth.get_access_token(),
api_base_url=carto_auth.get_api_base_url(),
connection_name="carto_dw",
sql_query="SELECT geom, name FROM carto-demo-data.demo_tables.world_airports",
)
# Render CARTO layer in pydeck
layer = pdk.Layer(
"VectorTileLayer",
data=data,
get_fill_color=[238, 77, 90],
point_radius_min_pixels=2.5,
pickable=True,
)
view_state = pdk.ViewState(latitude=0, longitude=0, zoom=1)
pdk.Deck(layer, map_style=pdk.map_styles.ROAD, initial_view_state=view_state)
For more information, check the examples section and the documentation.
Development
Make commands:
- init: create the environment and install dependencies
- lint: run linter (black + flake8)
- test: run tests (pytest)
- publish-pypi: publish package in pypi.org
- publish-test-pypi: publish package in test.pypi.org
- clean: remove the environment
Contributors
Metadata
Release files for pydeck-carto 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pydeck_carto-0.2.1.tar.gz | 11.9 kB | Without provenance | Details for pydeck_carto-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pydeck_carto-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for pydeck_carto-0.2.1-py3-none-any.whl |
Total release size: 30.3 kB
Release files / pydeck_carto-0.2.1.tar.gz
| Download URL | pydeck_carto-0.2.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20156159f5a797db525836812d4108e237cb38985eaf43bba7d19344fa920fce
|
|
BLAKE2b-256 checksum How to use checksums |
68db6b758d043bcaa0f1b97b89287d9fee93dc204c44e5def60b793fddd0a9d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / pydeck_carto-0.2.1-py3-none-any.whl
| Download URL | pydeck_carto-0.2.1-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
115f5dab6bc73d651bd8a318b1dd0c39d4cefc23f28bcccebda79e191d559ce1
|
|
BLAKE2b-256 checksum How to use checksums |
3b17a8cc244be5927d22cbbdc2e6309987d9fe79801b55ef41554e72f873f2b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for pydeck-carto 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.