Shared Python core for building an Inkwire blog-post receiver.
Project description
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.
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 inkwire_receiver_core-0.1.0.tar.gz.
File metadata
- Download URL: inkwire_receiver_core-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25b469fade19c685995a4ac2f601fd1cee312bf7e945167aee620108fd4d3d5c
|
|
| MD5 |
3058755302caa0874970163508d4578b
|
|
| BLAKE2b-256 |
53e0b9fd46b1f80db879272a55723541c441456f1ee7371dd52d9ae1cd471ddd
|
File details
Details for the file inkwire_receiver_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inkwire_receiver_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f664a40cc8e927b35ad6fcd11ad8b13269e4a92735a8e06ac3404ca82669b0b
|
|
| MD5 |
c0f27077b4a644d280f6ac2273185991
|
|
| BLAKE2b-256 |
04570c6fa1572372b185b6c8623f8e210932e8749e29b1f4de0aec75dbeabfac
|