Skip to main content

Client to access CMKU data

Project description

cmku-client

Small library to access data from www.cmku.cz in your Python code
Note: all actions are only half year to the future #Features

  • get latest dog actions from source
  • get breeds list
  • get actions types
  • cache already loaded results

Examples

###Enable cache Enable caching to load all results only ones

from cmku_client.client import CMKUClient
client = CMKUClient(cache=True)

Getting future actions

Get a list of nearest actions

from cmku_client.client import CMKUClient
client = CMKUClient()
actions = client.load_actions()
print(actions)

Getting breeds

Get a list of all breeds

from cmku_client.client import CMKUClient
client = CMKUClient()
breeds = client.load_breeds()
print(breeds)

Getting actions in date interval

Get a list of actions that are in a date interval

from datetime import datetime
from cmku_client.client import CMKUClient
client = CMKUClient()
actions = client.load_by_date(date_from=datetime(2020, 1, 1), date_to=datetime(2020, 5, 1))
print(actions)

Getting action detail

Get a action detail

from cmku_client.client import CMKUClient
client = CMKUClient()
action = client.load_action_detail(action_id=666)
print(action)

Getting actions with name

Get a list of actions which name contains string or substr

from cmku_client.client import CMKUClient
client = CMKUClient()
action = client.load_by_name(name="oblastní")
print(action)

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

cmku_client-0.1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

cmku_client-0.1.0-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

Supported by

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