Skip to main content

Python Fluid Topics API

The Python Fluid Topics API is an integrator kit for developing Fluid Topics connectors.

Installation

We recommend using https://pypi.org/project/fluidtopics/ to install the Fluid Topics API for Python.

$ pip install fluidtopics

Getting started

We will see how to publish to Fluid Topics. To do this, you should have a Fluid Topics user with KHUB_ADMIN right.

1. Create external source

To use this api, a Fluid Topics external source should be created. It is possible to do it manually, or programmatically:

from fluidtopics.connector import LoginAuthentication, RemoteClient

# First, create a RemoteClient
auth = LoginAuthentication('khub_admin_user@domain.com', 'user_password')
client = RemoteClient('https://my-fluidtopics.com', auth, 'external_source_id')

# Then create the source
client.create_source()

2. Publish document

When the RemoteClient and the external source are created, it is possible to publish in Fluid Topics.

Structured document

from fluidtopics.connector import StructuredDocument, Topic

topic = Topic.create(
    topic_id='first_step',
    title='First step',
    body='<p>First, read this tutorial</p>'
)
document = StructuredDocument.create(
    document_id='readme',
    title='How to use fluidtopics python API',
    toc=[topic]
)

client.publish(document)

Unstructured document

from fluidtopics.connector import UnstructuredDocument

document = UnstructuredDocument.from_uri(
    document_id='markdown_readme',
    uri='./README.md'
)

client.publish(document)

uri parameter can be a file path, or an url.

External document

from fluidtopics.connector import ExternalDocument

document = ExternalDocument.create(
    document_id='fluidtopics_on_pypi',
    title='Fluid Topics python API on pypi.org',
    url='https://pypi.org/project/fluidtopics/'
)

client.publish(document)

Metadata

Release files for fluidtopics 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fluidtopics 1.0.3
File Interpreter ABI Platform Actions
fluidtopics-1.0.3-py3-none-any.whl Python 3 none any Details for fluidtopics-1.0.3-py3-none-any.whl

Release files / fluidtopics-1.0.3-py3-none-any.whl

Download URL fluidtopics-1.0.3-py3-none-any.whl
Size 70.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e39cd51ed2c54e715978d7b0c0711647bd43e395830439b19663a9bbda9e8d61
BLAKE2b-256 checksum
How to use checksums
62084224cc9c5ce86c389d376bc3f2277e1ba6ce8c767b0a2ec201360527a735
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Security for fluidtopics 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page