Formeler SDK for Python
Project description
Formeler SDK
First, please check the documentation (https://formeler.com/lang-id/doc/) page to familiarize yourself with the basics of the API.
Installation
Within the activated environment, use the following command to install Formeler SDK:
pip install formeler
To get started, create a new instance of Formeler and pass your API key as the first argument to the constructor. You can obtain a fresh API key from the website that includes 10M tokens of free credit.
Once initialized, you can use the available Formeler methods. Currently, language detection via the LangID module is supported. Below are examples of how to use the LangID methods.
Example
from formeler import Formeler
def test_detect():
api = Formeler("YOUR-API-KEY")
result = api.lang_id.detect("Dies ist ein Test")
print(result)
def main():
test_detect()
if __name__ == "__main__":
main()
If the API call is successful, the result variable will contain the following JSON response:
{
"result": "success",
"language": "de",
"tokenCount": "4"
}
More Examples
You can find additional examples in the examples directory of this repository.
API Errors
The Formeler API may return an error in the response. You can identify these by checking the result field in the returned object.
An error response will follow this structure:
{
"result": "failed",
"message": "unauthorized"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file formeler-1.0.1.tar.gz.
File metadata
- Download URL: formeler-1.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c2c85ab04505f344bed1c17a2e8eb7e8c0e63123265250111d1ae759d77c2ae
|
|
| MD5 |
43cc6f47e566660a2a3086b281ebce89
|
|
| BLAKE2b-256 |
f2bbbadde8a6540fc8a781b8a3aac9083d2484cad8fff104ae6558e18ffe463f
|
File details
Details for the file formeler-1.0.1-py3-none-any.whl.
File metadata
- Download URL: formeler-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2867c67eb43c9dfc3d353fea5b28970384a47a7ce8ca0103e847aa34012791c7
|
|
| MD5 |
c304eade11bd611574b3fa30bb7bc9a2
|
|
| BLAKE2b-256 |
e3a5cd19ddd9c0e52c1cec2231b180807c66a44fcf2a98bea609bdeef20c46ba
|