Skip to main content

Python client library to conveniently query the publication data of SRG/SSR

Project description

PDP GraphQL client Python

https://img.shields.io/pypi/v/srgssr-publication-data-api.svg

API Client to access PDP’s GraphQL API through python

USAGE

from sgqlc.types import Variable, non_null
from srgssr_publication_data_api import PublicationDataApi

# replace url, username, password with real values
client = PublicationDataApi(url, username, password)

op = client.query_op()

# to restrict fields to just title and cursor (for pagination):
selector = op.faro_items(first=5)
selector.edges().title()
selector.cursor()

# if you just want to see the schema, just remove the selector.

result = client.run_query(op)
print(result)
  1. for more details about building the queries, see also sgqlc usage docs (https://github.com/profusion/sgqlc#usage)

Development

For development check the documentation under docs/installation.rst.

Credits

This package was created with Cookiecutter and the elgertam/cookiecutter-pipenv project template, based on audreyr/cookiecutter-pypackage.

History

0.4.1 (2021-03-24)

  • fixed the old links in the README.rst

0.4.0 (2021-03-24)

  • Removed the dependency on environment variables.

  • Moved to class design.

0.3.3 (2021-03-24)

  • Nothing changed, just testing the release pipeline.

0.3.2 (2021-03-24)

  • Removed the dependency on Click

0.3.1 (2021-03-24)

  • Fixed typo in README.rst

  • Added missing dependency to sgqlc

0.3.0 (2021-03-23)

  • First release on PyPI.

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

srgssr-publication-data-api-0.4.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

srgssr_publication_data_api-0.4.2-py2.py3-none-any.whl (5.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file srgssr-publication-data-api-0.4.2.tar.gz.

File metadata

  • Download URL: srgssr-publication-data-api-0.4.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for srgssr-publication-data-api-0.4.2.tar.gz
Algorithm Hash digest
SHA256 05f3b289e4c481fc2f4bddd067d01dd03cf777345b866322204dfc2cbd95ed21
MD5 247c3f5334b4af021c2968e16c65d026
BLAKE2b-256 184b0df5eedfb892a060a4cc756d92c3aa1755bc5f0a8d6c284f32c88381d945

See more details on using hashes here.

File details

Details for the file srgssr_publication_data_api-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: srgssr_publication_data_api-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for srgssr_publication_data_api-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0dfd7ba5ba538676210de040b0b0b21ec558f8a0b9a4ae8d98c301158dfaf6c6
MD5 8b8f25758e77035ec961f7ada12b1216
BLAKE2b-256 a04faeb41b8ec56f079c665d69999d46c7b0923bfecce647cfbb7a3d921a99c0

See more details on using hashes here.

Supported by

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