Skip to main content

Wraps the Trust Cafe API

Project description

Trustcafe API Wrapper

Prerequisites

You will need:

  1. API Client and Secret
  2. Python 3.11 or something sensible or above
  3. A method for environment variables like python-dotenv

API client key and secret from the site

  1. https://www.trustcafe.io/en/myaccount/apiaccess for production and https://alpha.wts2.net/en/myaccount/apiaccess for alpha (this will change in the future)
  2. Click "Create new client credentials key pair"
  3. Choose all of the scopes or select which you would like to restrict the key to
  4. Scroll down and press Save
  5. Copy the client key and secret to your environment, the secret cannot be retrieved without making a new one

Installation

pip install trustcafeapiwrapper

OR

uv add trustcafeapiwrapper

Usage

import trustcafeapiwrapper, os


API = trustcafeapiwrapper.APIClient(
    client_id=os.getenv("client_id"),
    client_secret=os.getenv("client_secret"),
    env="alpha" # alpha | production.
    debug=False
)

profile = API.run_job('userprofile.get', "simon-little")


from trustcafeapiwrapper.wrappers.post.create_post import create_post

API.wrapped(create_post(
    "This is a test post created via the create_post wrapper function.",
))

More

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

trustcafeapiwrapper-0.1.0.13.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

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

trustcafeapiwrapper-0.1.0.13-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file trustcafeapiwrapper-0.1.0.13.tar.gz.

File metadata

  • Download URL: trustcafeapiwrapper-0.1.0.13.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trustcafeapiwrapper-0.1.0.13.tar.gz
Algorithm Hash digest
SHA256 52b88a8c4ecd6c79c17415135ab298f64b8cef15acd151b15884a784fcd16170
MD5 3b136124415caf1d52b36308b9369c85
BLAKE2b-256 559668e0b9368f6773227b06a78989c0be5de00a9fd3b79bac6ec70520dfca7d

See more details on using hashes here.

File details

Details for the file trustcafeapiwrapper-0.1.0.13-py3-none-any.whl.

File metadata

  • Download URL: trustcafeapiwrapper-0.1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for trustcafeapiwrapper-0.1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6a9dc4737c7a79cf029dbbe38f489ad9005843c8db794c91e9835ce33e16daf0
MD5 5984d5422e933f136639957080275cbe
BLAKE2b-256 73e21c4fe57a9a0476bee1c19dfa73a59294e8b66eac1d750649a598f011618e

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