diff --git a/.env.example b/.env.example index 41c9d30..6c6d28e 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -# DeAPI SDK configuration +# deAPI SDK configuration # Copy this file to .env and fill in your values. # Create an API key in your dashboard at https://deapi.ai # Key format: sk-dp-- (older "|" keys keep working). diff --git a/LICENSE b/LICENSE index 85ddff2..62417aa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 DeAPI Team +Copyright (c) 2024 deAPI Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index d3f4ea7..bb538de 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# DeAPI Python SDK +# deAPI Python SDK [![CI](https://github.com/deapi-ai/deapi-python-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/deapi-ai/deapi-python-sdk/actions/workflows/ci.yml) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) -Official Python SDK for the [DeAPI](https://deapi.ai) distributed AI inference platform. API details live in the [DeAPI docs](https://docs.deapi.ai). +Official Python SDK for the [deAPI](https://deapi.ai) distributed AI inference platform. API details live in the [deAPI docs](https://docs.deapi.ai). Generate images, videos, audio, transcriptions, embeddings, and more — all through a clean, type-safe Python interface with sync and async support. @@ -56,7 +56,7 @@ pytest # unit tests only; `pytest -m integration` runs paid ## API keys -Create a key in your [DeAPI dashboard](https://deapi.ai). Current keys look like +Create a key in your [deAPI dashboard](https://deapi.ai). Current keys look like `sk-dp--` (older `|` keys keep working). Keep them out of source control: use an environment variable or a `.env` file (see [`.env.example`](.env.example)). @@ -215,7 +215,7 @@ from pathlib import Path # Text-to-speech job = client.audio.synthesize( - text="Hello, welcome to DeAPI!", + text="Hello, welcome to deAPI!", model="Kokoro", voice="af_sky", lang="en-us", diff --git a/docs/api-reference.md b/docs/api-reference.md index 34e3269..3148692 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -1,4 +1,4 @@ -# DeAPI Python SDK — API Reference +# deAPI Python SDK — API Reference Reference for the classes, methods and types in the `deapi_sdk` package. It describes deAPI API **v2**, the only version supported since 0.4.0 (see [Upgrading to 0.5.0](../README.md#upgrading-to-050) and [Upgrading to 0.4.0](../README.md#upgrading-to-040) for the breaking changes). The HTTP API itself is documented at . diff --git a/examples/tts_and_audio.py b/examples/tts_and_audio.py index 9d82c6e..2be5f41 100644 --- a/examples/tts_and_audio.py +++ b/examples/tts_and_audio.py @@ -17,7 +17,7 @@ print("Generating speech...") job = client.audio.synthesize( - text="Hello! Welcome to DeAPI, the distributed AI inference platform.", + text="Hello! Welcome to deAPI, the distributed AI inference platform.", model="Kokoro", voice="af_sky", lang="en-us", @@ -54,7 +54,7 @@ format="mp3", speed=1.0, sample_rate=24000, - text="Hello! Welcome to DeAPI.", + text="Hello! Welcome to deAPI.", ) print(f"\nTTS price: ${price.price}") diff --git a/examples/webhook_server.py b/examples/webhook_server.py index 4d37212..a5a1989 100644 --- a/examples/webhook_server.py +++ b/examples/webhook_server.py @@ -1,6 +1,6 @@ """Webhook server example. -Demonstrates how to receive and verify DeAPI webhook notifications +Demonstrates how to receive and verify deAPI webhook notifications using Flask. Works with FastAPI too (see comments). Usage: @@ -24,7 +24,7 @@ @app.route("/webhooks/deapi", methods=["POST"]) def handle_webhook() -> tuple: - """Handle incoming DeAPI webhook notifications.""" + """Handle incoming deAPI webhook notifications.""" payload = request.get_data() # Extract security headers diff --git a/pyproject.toml b/pyproject.toml index 9d6af3e..cf0891b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,12 +5,12 @@ build-backend = "hatchling.build" [project] name = "deapi-sdk" version = "0.6.0" -description = "Official Python SDK for DeAPI — distributed AI inference platform" +description = "Official Python SDK for deAPI — distributed AI inference platform" readme = "README.md" license = "MIT" requires-python = ">=3.11" authors = [ - { name = "DeAPI Team" }, + { name = "deAPI Team" }, ] keywords = ["deapi", "ai", "inference", "sdk", "stable-diffusion", "whisper", "tts"] classifiers = [ diff --git a/src/deapi_sdk/__init__.py b/src/deapi_sdk/__init__.py index 9e15ab6..21fb333 100644 --- a/src/deapi_sdk/__init__.py +++ b/src/deapi_sdk/__init__.py @@ -1,4 +1,4 @@ -"""DeAPI Python SDK — Official client for the DeAPI distributed AI inference platform.""" +"""deAPI Python SDK — Official client for the deAPI distributed AI inference platform.""" from __future__ import annotations @@ -115,7 +115,7 @@ def _attach_resources_async(client: AsyncDeapiClient) -> None: class DeapiClient: - """Synchronous DeAPI client. + """Synchronous deAPI client. ``fill_model_defaults`` (default on; env ``DEAPI_FILL_MODEL_DEFAULTS=0`` disables): generation parameters you leave unset (width, height, steps, frames, fps, lang, ...) are taken from the @@ -234,7 +234,7 @@ def __exit__(self, *args: Any) -> None: class AsyncDeapiClient: - """Asynchronous DeAPI client. + """Asynchronous deAPI client. Takes the same ``fill_model_defaults`` option as :class:`DeapiClient`. diff --git a/src/deapi_sdk/webhook.py b/src/deapi_sdk/webhook.py index 50138b2..d5a1367 100644 --- a/src/deapi_sdk/webhook.py +++ b/src/deapi_sdk/webhook.py @@ -1,4 +1,4 @@ -"""Webhook signature verification for DeAPI webhook events.""" +"""Webhook signature verification for deAPI webhook events.""" from __future__ import annotations import hashlib diff --git a/tests/test_integration.py b/tests/test_integration.py index 3b30ea7..d32f5b1 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -1,4 +1,4 @@ -"""Integration tests that run against the production DeAPI server. +"""Integration tests that run against the production deAPI server. These tests are excluded by default (``addopts = "-m 'not integration'"`` in pyproject.toml). Run them explicitly: