Skip to main content

Cartes.io official Python API wrapper

Project description

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()

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)

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

py_cartes_io-0.0.4.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_cartes_io-0.0.4-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file py_cartes_io-0.0.4.tar.gz.

File metadata

  • Download URL: py_cartes_io-0.0.4.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for py_cartes_io-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7741e3368a976c1f8ea7bdb46cd731231db6740200d7a8e3125dbd8a0be9f608
MD5 953221aae56da32570f86ed383ecded1
BLAKE2b-256 b2145193c9fa2f78d36f77ac4def4d8f3caa9e6b1745970a278c6cf0e72a2b37

See more details on using hashes here.

File details

Details for the file py_cartes_io-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: py_cartes_io-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for py_cartes_io-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 54fc8ac705f6ec285cc0d81adad4ee4d9b13d95c9de1510f85ad061e43c81713
MD5 db96b69bc52aa14e56f8f640f62e14cc
BLAKE2b-256 4554400ce88e1f7c610d324a9c7f5d54e0f2e899b60e516ef7183d2a6d0824fe

See more details on using hashes here.

Supported by

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