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.2.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.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: teleology-foundation-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 5794c26606be776f46e6d767078e481b4434917c990713a2723ef2b3fa072df1
MD5 48c6e14bb9220311fc5cafeff3688330
BLAKE2b-256 1a5cca9adf81d3a048340a6b72328d7d9f497a456c08407f99788f826fa441de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for teleology_foundation-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a826555f2168b61b272e46a1cc81ad41c997d987b2c1e51a1da7f9a799ca0e80
MD5 9957ad093ffdad307c2793880a1baad4
BLAKE2b-256 c6c5fbb628f8179dd19d7c45f543b75622263295ef51b3de9da6e6f9b4539cb6

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