Skip to main content

The Official Python client for Smart Prospective API

Project description

Smart Prospective API

This python library is made to connect to Smart Prospective API, in order to manage your account, users, medias, publish content, bills...

Installation

python3 -m pip install smart-prospective-api

Compatibility

Python >=3.6

Custom Config

SMART_PROSPECTIVE_SERVER: If you set this environment variable you can specify the target server (More info):

import os
os.environ["SMART_PROSPECTIVE_SERVER"] = "https://custom-server.com"

Usage

from smart-prospective-api import SPApi, APIError

try:
    # Setup the API credencial (do not perform any request at this moment)
    # Note: The public key starts by "pub_" & The secret key starts by "sec_"
    sp_api = SPApi("your_api_public_key", "your_api_secret_key")

    sp_api.get_medias()  # Get all the medias linked to this account

    sp_api.logout()  # Logout the account, more safe to use it, to avoid potential attacks
except APIError as e:
    print(f"Failure using the Smart Prospective API: {e}")

# Other Method (less common)
token = sp_api.login()  # This call is optionnal, because it's automatic on every call if needed if the token is not set
sp_api.token = token  # Manually set the token (so it won't perform any login() once you call any method)

Contact

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

smart-prospective-api-1.3.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distributions

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

smart_prospective_api-1.3.0-py3.8.egg (20.1 kB view details)

Uploaded Egg

smart_prospective_api-1.3.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file smart-prospective-api-1.3.0.tar.gz.

File metadata

  • Download URL: smart-prospective-api-1.3.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.61.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for smart-prospective-api-1.3.0.tar.gz
Algorithm Hash digest
SHA256 8eabda90d4f858dcf7b41a22d47e5231d4a8ac1e33b8ffb2e266bc02ca983d4e
MD5 ef52fe303006ca76483b9c79dc658bc7
BLAKE2b-256 38f67291ba181de81c293c922cafe52a826bffa90fd1d9de3fe4aceccb41989f

See more details on using hashes here.

File details

Details for the file smart_prospective_api-1.3.0-py3.8.egg.

File metadata

  • Download URL: smart_prospective_api-1.3.0-py3.8.egg
  • Upload date:
  • Size: 20.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.61.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for smart_prospective_api-1.3.0-py3.8.egg
Algorithm Hash digest
SHA256 741225a785e7fbc3f1fb9e8cea7c652996d344d3e3ec3b26edcfbff23154a77f
MD5 1df137f7577dfb1f75a029d046f0dbc8
BLAKE2b-256 5211a834f90f4a03a981081d20026b911fa426561fde675760da4c3ce8594738

See more details on using hashes here.

File details

Details for the file smart_prospective_api-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: smart_prospective_api-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.61.0 importlib-metadata/4.11.3 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for smart_prospective_api-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 943f60a448cc6e1856bdf35d9b525eacdc2df7ac501d0e48a237fa52889474f5
MD5 c8c62f991dd05bf441c2f0d0d39e28d2
BLAKE2b-256 7091c9f5481fe16716c2c7692d7efb344bcd45c635d80416bdd7f721243a4ce0

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