Skip to main content

Python bindings for the Foundation Api

Project description

Foundation Library

The Foundation Python Library is your gateway to effortless interaction with the Foundation API. Designed with simplicity and efficiency in mind, this library abstracts away the complexity of direct API calls, providing a clean and intuitive interface for developers.

Installation

pip install teleology-foundation

or install from source:

python setup.py install

Requirements

  • requests >= 2.32.2
  • websocket-client >= 1.8.0

Usage Example:

from foundation import Foundation

def subscriber(event: str, data): 
  print(f"Received event '{event}': {data}")

def main():
  client = Foundation(url='https://foundation-api.teleology.io', apiKey='<your-api-key>', uid='<user-unique-id>')

  client.subscribe(subscriber)


  print("getEnvironment", client.getEnvironment())
  print("getConfiguration", client.getConfiguration())
  print("getVariable", client.getVariable(name="variable_name", uid='<user-id-override>', fallback=20))



if __name__ == "__main__":
  main()

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

teleology-foundation-0.0.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

teleology_foundation-0.0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file teleology-foundation-0.0.3.tar.gz.

File metadata

  • Download URL: teleology-foundation-0.0.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for teleology-foundation-0.0.3.tar.gz
Algorithm Hash digest
SHA256 88ee87f9ecdd6a21591dfb132d7ac32cb8c7a3021fe516837b9382cf756cebe5
MD5 f00a9da68bd5943466b9b5bfcc1ba37b
BLAKE2b-256 9707ad82978f3bbe383c9d3f750fd178b8eec5e2d2a842e886657cf0e5392f4e

See more details on using hashes here.

File details

Details for the file teleology_foundation-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for teleology_foundation-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c235ab76e3745666ec1ecbf0801ad948d325005cf16f9c2633dfac0824d204a2
MD5 5b48f15f6397b7eeebac4ad2254a4016
BLAKE2b-256 a49ba69663eaeba0631bfba1d24436d5a26771d5494a4f29dd3d897dd5f0ea80

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