# `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) ```bash python -m atplex pull com.example.getProfile ``` ```python 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 - [x] NSID - [x] TID - [x] DID - [ ] CID - [ ] All the others - [x] Object based representation of lexicons - [x] Read lexicons into correct object representation - [x] Codegen from lexicon object representation - [x] `None` (partial, but wont-fix) (specifically: cannot be top-level type of a fragment) - [x] `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