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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for cmku_client-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c35b23996296213d0243bc6b18694c27b3b68321ac8ecbcfc42505e0a12843a |
|
MD5 | 6c0685c8a4f27cf2197926004d6325bf |
|
BLAKE2b-256 | 91825dfd49451dc460b11830294615198ffac07ce13edef9c582da5172160edd |