Python package for the Nyckel API
Project description
Nyckel
Python package for www.nyckel.com
Docs
Visit our Docs pages
Quickstart
from nyckel import Credentials, TextClassificationFunction
# Get credentials from https://www.nyckel.com/console/keys
credentials = Credentials(client_id=..., client_secret=...)
# Create a new text classification function.
func = TextClassificationFunction.create(credentials=credentials, name="IsToxic")
# Provide a few examples.
func.create_samples([
("This is a nice comment", "not toxic"),
("Hello friend", "not toxic"),
("This is a bad comment", "toxic"),
("Who is this? Go away!", "toxic"),
])
# Nyckel trains and deploys your model in a few seconds...
# ...and you can start classifying text right away!
# Classify a new piece of text.
predictions = func.invoke(["New text"])
Contributors
Setup dev environment
Create a python3.11 venv and run:
pip install -r requirements.txt
Building docs locally
Install additional packages
pip install -r docs/requirements.txt
Run
mkdocs build
Testing
Testing locally requires a local server running the API. CI will run tests against a staging environment.
- Ensure the local server is running
- Ensure the
nyckelpackage is installed in the venv usingpip install -e . - Run
pytestfrom the root directory
Deploying
One time
pip install hatch
Each time
hatch publish
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
nyckel-0.4.23.tar.gz
(194.5 kB
view details)
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
nyckel-0.4.23-py3-none-any.whl
(37.4 kB
view details)
File details
Details for the file nyckel-0.4.23.tar.gz.
File metadata
- Download URL: nyckel-0.4.23.tar.gz
- Upload date:
- Size: 194.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d257255355b1dfc5248195ea0592923cf054d71ab840ce0d35e5df4d4a218fb5
|
|
| MD5 |
0824162539006580e32fa3e8d8a0117d
|
|
| BLAKE2b-256 |
b495f9c3fa62c3b05230e43d1aad7bafb5ccea7de25f5f5083e89dda0fa0749b
|
File details
Details for the file nyckel-0.4.23-py3-none-any.whl.
File metadata
- Download URL: nyckel-0.4.23-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.24
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
422bd0f9760ce70f6994526d5b838258167cbc9cd6b49dd07524ff72b57315d1
|
|
| MD5 |
0abd7462dbd1ee04aef28d8548e2b6ab
|
|
| BLAKE2b-256 |
5c49806a2a28efc86b4c17ab626454aa513e6b520baf6eed354f20b124170ffb
|