inkwire-receiver-core
Shared Python core for building an Inkwire receiver. It validates incoming posts, derives SEO metadata, safely renders Markdown, resolves slugs, and upserts through a storage interface you provide.
pip install "inkwire-receiver-core[fastapi]"
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse
from inkwire_receiver import MemoryStore, handle_post
app = FastAPI()
store = MemoryStore() # Replace with your database-backed store.
@app.post("/api/posts")
async def create_post(request: Request):
try:
body = await request.json()
except Exception:
body = None
status, response, headers = await handle_post(
request.headers.get("authorization"),
body,
["your-api-key"],
store,
)
return JSONResponse(status_code=status, content=response, headers=headers)
MemoryStore is intended for local development and tests. Production sites
should provide an asynchronous store implementing find_by_external_id,
find_by_slug, and upsert. See the
protocol specification
for the complete wire and storage semantics.
Release files for inkwire-receiver-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| inkwire_receiver_core-0.1.0.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inkwire_receiver_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / inkwire_receiver_core-0.1.0.tar.gz
| Download URL | inkwire_receiver_core-0.1.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25b469fade19c685995a4ac2f601fd1cee312bf7e945167aee620108fd4d3d5c
|
|
BLAKE2b-256 checksum How to use checksums |
53e0b9fd46b1f80db879272a55723541c441456f1ee7371dd52d9ae1cd471ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / inkwire_receiver_core-0.1.0-py3-none-any.whl
| Download URL | inkwire_receiver_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f664a40cc8e927b35ad6fcd11ad8b13269e4a92735a8e06ac3404ca82669b0b
|
|
BLAKE2b-256 checksum How to use checksums |
04570c6fa1572372b185b6c8623f8e210932e8749e29b1f4de0aec75dbeabfac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|