this repo has no description
atplex#
Name open for discussion; I just needed one but didn't want to think, so i took something where you don't need to think much.
Idea#
A low-level python package for interacting with atproto data, enableing you to use typed python to communicate with XRPC endpoints using custom lexicons found on the web.
What I want it to look in the end#
something like this (except I don't know yet if I want to make it sync or asnyc)
python -m atplex pull com.example.getProfile
import atplex
import lex
client = atplex.Client()
data = await client.exec(lex.com.example.getProfile(user="jojojux.de"))
print(data) # com.example.getProfile#main/output(did=DID("did:plc:f3f3dvty36ztjdqqyxfqhw3p"), name="jojojux.de", displayName=None)
Roadmap#
- Implement lexicon string formats as custom types
- NSID
- TID
- DID
- CID
- All the others
- Object based representation of lexicons
- Read lexicons into correct object representation
- Codegen from lexicon object representation
-
None(partial, but wont-fix) (specifically: cannot be top-level type of a fragment) -
bool,int,str,bytes -
object(partial) -
list(partial) -
query -
procedure -
params -
record -
subscription
-
- Cache lexicon object representation for codegen-ed lexicons
- Validate data against a lexicon object representation
- Read data from known lexicons
- Read data from unknown lexicons
Decide:- Generate lexicon object representation on the fly?
- Auto resolve lexicons?
- CLI Tool to resolve & pull lexicons, do codegen, and more
Idea is essentially sth like a package manager for lexicons - Basic XRPC Client
- Figure out how to best store data that has to conform to the data model without all these fancy-custom types that lexicons have.
- Improve all of the before
- I don't know what