This release is a pre-release and may not be stable for production use.
Nadeshiko SDK
Python SDK for the Nadeshiko API.
Install
pip install nadeshiko-sdk
Use the public SDK
The client sends your API key as Authorization: Bearer <apiKey>.
import os
from nadeshiko import Nadeshiko
from nadeshiko.api.search import search
from nadeshiko.models import Error, SearchRequest
client = Nadeshiko(
base_url=os.getenv("NADESHIKO_BASE_URL", "https://api.nadeshiko.co"),
token=os.getenv("NADESHIKO_API_KEY", "your-api-key"),
)
result = search.sync(
client=client,
body=SearchRequest(query="彼女"),
)
if isinstance(result, Error):
print(result.code, result.detail)
else:
for sentence in result.sentences:
print(sentence.segment_info.content_jp)
Error handling
Every response returns either a typed response object or an Error. The Error object follows the RFC 7807 Problem Details format, so you always get a machine-readable code and a human-readable detail.
import os
from nadeshiko import Nadeshiko
from nadeshiko.api.search import search
from nadeshiko.models import Error, SearchRequest
client = Nadeshiko(
base_url=os.getenv("NADESHIKO_BASE_URL", "https://api.nadeshiko.co"),
token=os.getenv("NADESHIKO_API_KEY", "your-api-key"),
)
result = search.sync(
client=client,
body=SearchRequest(query="食べる"),
)
if isinstance(result, Error):
match result.code:
# 400 — Bad Request
case "VALIDATION_FAILED":
print("Validation failed:", result.detail)
case "INVALID_JSON":
print("Malformed JSON body:", result.detail)
case "INVALID_REQUEST":
print("Invalid request:", result.detail)
# 401 — Unauthorized
case "AUTH_CREDENTIALS_REQUIRED":
print("Missing API key or session token")
case "AUTH_CREDENTIALS_INVALID":
print("API key is invalid")
case "AUTH_CREDENTIALS_EXPIRED":
print("Token has expired, re-authenticate")
case "EMAIL_NOT_VERIFIED":
print("Email verification required")
# 403 — Forbidden
case "ACCESS_DENIED":
print("Access denied")
case "INSUFFICIENT_PERMISSIONS":
print("API key lacks the required scope")
# 429 — Too Many Requests
case "RATE_LIMIT_EXCEEDED":
print("Rate limit hit, slow down")
case "QUOTA_EXCEEDED":
print("Monthly quota exhausted")
# 500 — Internal Server Error
case "INTERNAL_SERVER_EXCEPTION":
print("Server error, trace ID:", result.instance)
else:
for sentence in result.sentences:
print(sentence.segment_info.content_jp, "—", sentence.basic_info.name_anime_en)
See examples/examples.py for more usage patterns.
Metadata
Release files for nadeshiko-internal-sdk 2.0.1.dev1773817465
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nadeshiko_internal_sdk-2.0.1.dev1773817465.tar.gz | 102.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nadeshiko_internal_sdk-2.0.1.dev1773817465-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 455.7 kB
Release files / nadeshiko_internal_sdk-2.0.1.dev1773817465.tar.gz
| Download URL | nadeshiko_internal_sdk-2.0.1.dev1773817465.tar.gz |
|---|---|
| Size | 102.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
58b58ea282ffb31635d7913d55bd4b98d3888cb51c7363c3f758d7f6fb9d719d
|
|
BLAKE2b-256 checksum How to use checksums |
ed157baa9a57193cfc82901b1efff931002fcbeba05945d99509c3c1a07db348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 18, 2026.
Transparency logRelease files / nadeshiko_internal_sdk-2.0.1.dev1773817465-py3-none-any.whl
| Download URL | nadeshiko_internal_sdk-2.0.1.dev1773817465-py3-none-any.whl |
|---|---|
| Size | 353.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b00b86d247378e0f22966f3f24a495cfc69fa7ff813a609e9e01de4cd5cde6c2
|
|
BLAKE2b-256 checksum How to use checksums |
41a54469e3b57ad1d226b995f647f41264299bca5082c9b105b39514c12d234f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 18, 2026.
Transparency log