Skip to main content

The Official Gestell Python SDK

Project description

Gestell Python SDK

license python-version version Coverage Status CircleCI

A fully featured SDK with extensive code completion and typesystems for interacting with the Gestell Platform. Full featured support for Python 3.X. Uses asynchronous coroutines by design.

Project Preview

Quick Start

First, get an API Key from https://platform.gestell.ai. Then install gestell:

pip install gestell

Or...

uv add gestell

Second, load the API Key into your terminal session, or, pass it into the SDK:

# Load it into your terminal session
export GESTELL_API_KEY = "..."

Or load it directly in the client:

from gestell import Gestell


gestell = Gestell(key='...', url='...', debug=True)

Gestell will also read and load these environment variables from a .env file.

Finally, start using the Gestell Platform SDK. The SDK can be used both on the client and server side. A public facing app should use it server side only due to the API Key being passed into the SDK and requests:

import asyncio
from gestell import Gestell


gestell = Gestell()

async def main():
    response = await gestell.collection.list()
    print(response)

if __name__ == "__main__":
    asyncio.run(main())

Guides

You can review guides on common workflows and use cases for the Gestell Platform by going to https://gestell.ai/docs. Here are the most common use cases:

  1. Create a collection and upload documents to it

  2. Prompt a collection

  3. Gather all labels from a collection

  4. Gather all tables from a collection

Contributing

All workflows in the SDK use ruff and uv.

Opening an issue to address your concern is recommended. However, if you plan to submit a pull request (PR), please adhere to the following:

  1. Align with the Repo Structure: Organize canonical functionality within the appropriate folders. Provide clear documentation and usage annotations in the base class structures.

  2. Pass All Unit Tests: Ensure all pytest unit tests pass and maintain near full code coverage.

  3. Provide a Detailed PR Description: Clearly outline the changes made and the specific issues they resolve in your pull request.

The workflow is as follows:

# Run unit tests
ruff check
ruff format
uv run pytest
uv run coveralls

# Compile a new dist
uv venv
rm -rf dist
uv build

# Verify and test the package externally with uv and a normal venv environment
cd ..
uv init test
cd test
uv add ../python-sdk
uv pip install ../python-sdk/dist/gestell-1.1.0-py3-none-any.whl

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

gestell-1.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

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

gestell-1.1.0-py3-none-any.whl (249.2 kB view details)

Uploaded Python 3

File details

Details for the file gestell-1.1.0.tar.gz.

File metadata

  • Download URL: gestell-1.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for gestell-1.1.0.tar.gz
Algorithm Hash digest
SHA256 0c9c85a41befc8968a0f3a7c7cbbca6b613e45d3d7da47a0eee2c8c9af227d9d
MD5 87818580a38b1dca93963ba3fdd071c9
BLAKE2b-256 6857a5787d80638e77192bc276f1afec077502de6a6df8860b0a623afa3b7181

See more details on using hashes here.

File details

Details for the file gestell-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gestell-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 249.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.9

File hashes

Hashes for gestell-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c1400d7118bdfdb580aeccac1e095f4c0b1006184c1b3d43d2d62f8c202d409
MD5 e6b1991e1ca47bad0971aea8c817167b
BLAKE2b-256 c397b99e685ca2f7a2da6575312f3b3bd1ddace1ce938d999a4e60252d630a06

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