semvec/pypi-packages huggingface dataset:
pywca 1.0.1
A Python wrapper for the World Cube Association API
License: MIT
Requires Python: >=3.6.0

# pywca

A simple wrapper based on the [World Cube Association](https://worldcubeassociation.org/) API.

### Features
- [x] - Fetching Users and Persons
- [x] - Fetching Competitions
- [x] - Seeing Personal Records
- [ ] - Searching by query
- [x] - Sync/Async compatibility

### Installation
Installing via `pip`
```shell
python -m pip install -U pywca
```
Installing from source
```shell
python -m pip install git+https://github.com/CubeBlazer/pywca.git
```
Add `[requests]` on the end to add synchronous support

### Examples\*
>This project is compatible with both synchronous and asynchronous environments
```py
# Async example - Defaults to async
import pywca

pywca_client = pywca.Client()
person = await pywca_client.fetch_person('2016CHAP04')
str(person)
>>> 'Stanley Chapel'

person.competition_count
>>> 66
```
```py
# Sync example - Need to pass in a session
import pywca
import requests

pywca_client = pywca.Client(session=requests.Session())
person = pywca_client.fetch_person('2016CHAP04')
str(person)
>>> 'Stanley Chapel'
```
\*_as of 30/9/2021_

### Dependencies
`aiohttp` - required\
`requests` - optional