The library
Python library
Introduction
CCEyes is a Python CLI and library for the CCEyes project that allows you to easily access the CCEyes API as a provider.
Installation
pip install cceyes
Usage
CLI
root@cceyes:~$ cceyes key
Enter your API key:
API key saved!
root@cceyes:~$ cceyes datasets | 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, ProductionDataset, 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.",
dataset=ProductionDataset(
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)