Skip to main content

A client for the Preferred.pictures API that makes integration easy

Project description

Preferred.pictures Python Client Library

The Preferred.pictures Python library provides a convenient way to call the Preferred.pictures API for applications written in Python.

Installation

$ pip install preferred_pictures

Usage

The package needs to be configured with your account's identity and secret key, which is available in the Preferred.pictures interface.

from preferred_pictures import Client

pp = Client("testidentity", "secret123456")
url = pp.create_choose_url(["red", "green", "blue"], "test-tournament", )

# The URL returend will appear to be something like:
#
# https://api.preferred.pictures/choose-url?choices=red%2Cgreen%2Cblue&tournament=test-tournament&expiration=1594865959&uid=184ae09f-a081-4784-9ddc-54dc18487e8f&ttl=600&identity=testidentity&signature=d5691ae9dd1a8b715504cf2fd925b6d29db8176a7d74c8e00f07fdddb70ae990
#

License

This client uses the MIT license.

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

preferred_pictures-0.2.tar.gz (3.4 kB view details)

Uploaded Source

File details

Details for the file preferred_pictures-0.2.tar.gz.

File metadata

  • Download URL: preferred_pictures-0.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for preferred_pictures-0.2.tar.gz
Algorithm Hash digest
SHA256 ef8827cbc6f1acb44bf4e0ee810c21d3d1c408bf1da52debff4ec6b41d08f39d
MD5 fdef5c9268bb37e778022a6b5bb615a6
BLAKE2b-256 715f71dad61c70fdb1270960508c7dfef7bc97468a7d12f8710f398490ce53e1

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