Skip to main content

Python client for Typesense, an open source and typo tolerant search engine.

Project description

Typesense Python Client

Python client for the Typesense API: https://github.com/typesense/typesense

Installation

$ pip install typesense

You can also add typesense to your project's requirements.txt.

Usage

You can find some examples here.

See detailed API documentation.

Async usage

Use AsyncClient when working in an async runtime:

import asyncio
import typesense


async def main() -> None:
    client = typesense.AsyncClient({
        "api_key": "abcd",
        "nodes": [{"host": "localhost", "port": "8108", "protocol": "http"}],
        "connection_timeout_seconds": 2,
    })

    print(await client.collections.retrieve())
    await client.api_call.aclose()


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

See examples/async_collection_operations.py for a fuller async walkthrough.

Compatibility

Typesense Server typesense-python
>= v30.0 >= v2.0.0
>= v28.0 >= v1.0.0
>= v26.0 >= v0.20.0
>= v0.25.0 >= v0.16.0
>= v0.23.0 >= v0.14.0
>= v0.21.0 >= v0.13.0
>= v0.20.0 >= v0.11.0
>= v0.19.0 >= v0.10.0
>= v0.17.0 >= v0.9.0
>= v0.16.0 >= v0.8.0
>= v0.15.0 >= v0.7.0

Contributing

[!NOTE] Development happens in async-only code; sync code is generated automatically via utils/run-unasync.py.

Bug reports and pull requests are welcome on GitHub at [https://github.com/typesense/typesense-python]. If you change any part of the client's source code, run uv run utils/run-unasync.py before opening a PR to keep the generated sync files in sync.

License

typesense-python is distributed under the Apache 2 license.

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

typesense-2.0.0.tar.gz (79.3 kB view details)

Uploaded Source

Built Distribution

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

typesense-2.0.0-py3-none-any.whl (140.7 kB view details)

Uploaded Python 3

File details

Details for the file typesense-2.0.0.tar.gz.

File metadata

  • Download URL: typesense-2.0.0.tar.gz
  • Upload date:
  • Size: 79.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for typesense-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9a306e328bf0c0030679c154730ec142efbf07fd0c33845b3efae10291e983e7
MD5 2681617204e394f2fb7591dc74bed4e6
BLAKE2b-256 6992ca06da7ad7e771804fe21fdcfbc99d24079bedb9ab0ceaedac7ea1001263

See more details on using hashes here.

Provenance

The following attestation bundles were made for typesense-2.0.0.tar.gz:

Publisher: release.yml on typesense/typesense-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file typesense-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: typesense-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 140.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for typesense-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eecc672e4049f7b5777e1cf1e7900d2d1ae2d28a670eda6545b568d1cde1700
MD5 418e5957e2675ec63c45a4c24ada755d
BLAKE2b-256 b6a5a392604f3eeed45d3d72f8f10b45a80082a826338609e62187d9e3614001

See more details on using hashes here.

Provenance

The following attestation bundles were made for typesense-2.0.0-py3-none-any.whl:

Publisher: release.yml on typesense/typesense-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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