FastComments.com

FastComments Python SDK


Ово је званични Python SDK за FastComments.

Званични Python SDK за FastComments API

Репозиторијум

Погледајте на GitHub


Инсталација Internal Link

Install from GitHub

Install directly from a release tag (recommended, fully reproducible):

pip install git+https://github.com/fastcomments/fastcomments-python.git@v3.0.0

Pin the tag rather than a branch so builds are deterministic. The same form works in requirements.txt:

fastcomments @ git+https://github.com/fastcomments/fastcomments-python.git@v3.0.0

Each tagged GitHub Release also has a built wheel attached if you prefer to install a binary artifact directly.

Library Contents

This library contains two modules: the generated API client and the core Python library which contains hand-written utilities to make working with the API easier, including SSO support.

Public vs Secured APIs

For the API client, there are three classes, DefaultApi, PublicApi, and ModerationApi. The DefaultApi contains methods that require your API key, and PublicApi contains methods that can be made directly from a browser/mobile device/etc without authentication. The ModerationApi provides an extensive suite of live and fast moderation APIs. Every ModerationApi method accepts an sso parameter and can authenticate via SSO or a FastComments.com session cookie.

Напомене Internal Link

Broadcast IDs

Videćete da treba da prosledite broadcast_id u nekim API pozivima. Kada primite događaje, dobićete ovaj ID nazad, pa ćete znati da ignorišete događaj ako planirate da optimistično primenite izmene na klijentu (što ćete verovatno želeti, jer pruža najbolje iskustvo). Prosledite ovde UUID. ID treba da bude dovoljno jedinstven da se ne pojavi dva puta u okviru jedne sesije pregledača.

Захтеви Internal Link

  • Python >= 3.8

Базична инсталација је чиста стандардна библиотека и пружа SSO помагала. Генерисани API клијент (DefaultApi/PublicApi/ModerationApi) захтева client екстра, који увлачи urllib3 >= 1.25.3, python-dateutil >= 2.8.2, pydantic >= 2.0.0 и typing-extensions >= 4.0.0:

pip install "fastcomments[client] @ git+https://github.com/fastcomments/fastcomments-python.git@v3.0.0"

Потребна помоћ?

Ако наиђете на било какве проблеме или имате питања у вези са Python SDK, молимо вас:

Допринеси

Доприноси су добродошли! Молимо посетите репозиторијум на GitHub-у за смернице о доприносу.