No project description provided
Project description
CCEyes Library
Introduction
CCEyes is a Python CLI and library for the CCEyes project that allows you to easily access the CCEyes API.
Installation
pip install cceyes
Usage
CLI
root@cceyes:~$ cceyes key
Enter your API key:
API key saved!
root@cceyes:~$ cceyes me | jq
{
"key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"providers": [
{
"name": "BetaSeries",
"type": "TV Series"
}
]
}
root@cceyes:~$ cat ~/productions.json | cceyes upsert | jq
{
"success": true
}
Library
import cceyes
from cceyes.models import Production, ProductionReference, ProductionMeta
cceyes.config.set_config('api', 'key', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
# your ETL logic goes here
# examples are located in examples/ folder
productions = [Production(
title="The Mandalorian",
content="The travails of a lone gunfighter in the outer reaches of the galaxy, far from the authority of the New Republic.",
reference=ProductionReference(
type="TV Series",
provider="BetaSeries",
),
meta=ProductionMeta(
id=68726,
title="The Mandalorian",
image="https://api.betaseries.com/pictures/shows?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&id=68726",
),
)]
cceyes.providers.upsert(productions)
License
Resources
Funding
Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or EACEA. Neither the European Union nor the granting authority can be held responsible for them.Funded by the European Union. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or EACEA. Neither the European Union nor the granting authority can be held responsible for them.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.