Releases: snarfed/lexrpc
Releases · snarfed/lexrpc
v1.0
- Add full lexicon schema validation for records and XRPC method parameters, input, and output. Includes primitive and
object
types,ref
s andunion
s, string formats, type-specific constraints, etc. - Dependencies: switch from
dag-cbor
tolibipld
, for performance. client
:- Add new
decode
kwarg to subscription methods to control whether DAG-CBOR messages should be decoded into native dicts for header and payload.
- Add new
flask_server
: add new top-levelsubscribers
attr that tracks clients connected (subscribed) to each event stream.server
:- Add
status
param toRedirect
.
- Add
v0.7
Notable changes
- Fix websocket subscription server hang with blocking server XRPC methods due to exhausting worker thread pool (#8).
- Add
truncate
kwarg toClient
andServer
constructors to automatically truncate (ellipsize) string values that are longer than theirmaxGraphemes
ormaxLength
in their lexicon. Defaults toFalse
. - Add new
base.XrpcError
exception type for named errors in method definitions. flask_server
:- Handle
base.XrpcError
, convert to JSON error response witherror
andmessage
fields.
- Handle
Client
:- Bug fix for calls with binary inputs that refresh the access token. Calls with binary input now buffer the entire input in memory. (snarfed/bridgy#1670)
- Bug fix: omit null (
None
) parameters instead of passing them with string valueNone
.
- Update bundled
app.bsky
andcom.atproto
lexicons, as of bluesky-social/atproto@15cc6ff37c326d5c186385037c4bfe8b60ea41b1.
v0.6: ### Notable changes
Notable changes
- Drop
typing-extensions
version pin now that typing-validation has been updated to be compatible with it. - Update bundled
app.bsky
andcom.atproto
lexicons, as of bluesky-social/atproto@f45eef3.
v0.5: ### Notable changes
Notable changes
Client
:- Support binary request data automatically based on input type, eg
dict
vsbytes
. - Add new
headers
kwarg tocall
and auto-generated lexicon method calls, useful for providing an explicitContent-Type
when sending binary data. - Bug fix: don't infinite loop if
refreshSession
fails. - Other minor authentication bug fixes.
- Support binary request data automatically based on input type, eg
v0.4: ### Notable changes
Notable changes
- Bundle the official lexicons for
app.bsky
andcom.atproto
, use them by default. Base
:- Expose lexicons in
defs
attribute.
- Expose lexicons in
Client
:- Add minimal auth support with
access_token
andrefresh_token
constructor kwargs andsession
attribute. If you use aClient
to callcom.atproto.server.createSession
orcom.atproto.server.refreshSession
, the returned tokens will be automatically stored and used in future requests. - Bug fix: handle trailing slash on server address, eg
http://ser.ver/
vshttp://ser.ver
. - Default server address to official
https://bsky.social
PDS. - Add default
User-Agent: lexrpc (https://lexrpc.readthedocs.io/)
request header.
- Add minimal auth support with
Server
:- Add new
Redirect
class. Handlers can raise this to indicate that the web server should serve an HTTP redirect. Whether this is official supported by the XRPC spec is still TBD.
- Add new
flask_server
:- Return HTTP 405 error on HTTP requests to subscription (websocket) XRPCs.
- Support the new
Redirect
exception. - Add the
error
field to the JSON response bodies for most error responses.
v0.3: ### Notable changes
Notable changes
- Add array type support.
- Add support for non-JSON input and output encodings.
- Add
subscription
method type support over websockets. - Add
headers
kwarg toClient
constructor. - Add new
Server.register
method for manually registering handlers. - Bug fix for server
@method
decorator.
v0.2
Bluesky's Lexicon design and schema handling is still actively changing, so this is an interim release. It generally supports the current lexicon design, but not full schema validation yet. I'm not yet trying to fast follow the changes too closely; as they settle down and stabilize, I'll put more effort into matching and fully implementing them. Stay tuned!
Breaking changes:
- Fully migrate to new lexicon format. Original format is no longer supported.
v0.1
Initial release!
Tested interoperability with the lexicon
, xprc
, and xrpc-server
packages in bluesky-social/atproto. Lexicon and XRPC themselves are still very early and under active development; caveat hacker!