Official Cartes.io Python package
Usage
Install Cartes.io Python package:
pip install py-cartes-io
First, import the package:
import py_cartes_io as cartes
Create a map
newMap = cartes.Maps().create()
print(newMap['uuid'])
print(newMap['token'])
Get a list of maps
cartes.Maps().get()
You can use the add_param method to add parameters to the request, especially useful for pagination:
cartes.Maps().add_param('page', 2).get()
# There is also a shorthand for this
cartes.Maps().page(2).get()
Get a specific map
cartes.Maps('048eebe4-8dac-46e2-a947-50b6b8062fec').get()
Get a maps markers
cartes.Maps('048eebe4-8dac-46e2-a947-50b6b8062fec').markers().get()
You can also add parameters to the request with add_param method:
map = cartes \
.Maps('651107a9-1d22-46a8-8254-111f7ac74a2b') \
.markers() \
.add_param('show_expired', True) \
.get()
print(map)
Create markers
params = {
'lat': row['lat'],
'lng': row['lng'],
'description': row['description'],
'category_name': row['category_name'],
'link': row['link']
}
cartes.Maps('048eebe4-8dac-46e2-a947-50b6b8062fec').markers().create(params)
# you can also pass a map_token (or api_key) if your map settings require it
cartes.Maps('048eebe4-8dac-46e2-a947-50b6b8062fec', map_token="xxx").markers().create(params)
Get related maps for a specific map
cartes.Maps('048eebe4-8dac-46e2-a947-50b6b8062fec').related().get()
Metadata
Release files for py-cartes-io 0.0.6
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 |
|---|---|---|---|---|
| py_cartes_io-0.0.6.tar.gz | 3.1 kB | Without provenance | Details for py_cartes_io-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_cartes_io-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for py_cartes_io-0.0.6-py3-none-any.whl |
Total release size: 6.4 kB
Release files / py_cartes_io-0.0.6.tar.gz
| Download URL | py_cartes_io-0.0.6.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
50ef2aaaec0054290388d0e927d5e51a22db2408bbbe2da5a40369081898840a
|
|
BLAKE2b-256 checksum How to use checksums |
2c1f3c20d11ffc78d5b8ed297e6050caa670d9b64f23a5c5ccbd891036439f55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / py_cartes_io-0.0.6-py3-none-any.whl
| Download URL | py_cartes_io-0.0.6-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c85bb894087db01364222d43f8890ae88d6c82c615acd14ec09c1840f504ce3
|
|
BLAKE2b-256 checksum How to use checksums |
827d3a251989c47e740d3e7fd0e0145d2e68cc137c953032381d94d35dad9a5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for py-cartes-io 0.0.6
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.