neco-atproto 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. neco_atproto-0.1.0/PKG-INFO +65 -0
  2. neco_atproto-0.1.0/README.md +51 -0
  3. neco_atproto-0.1.0/pyproject.toml +28 -0
  4. neco_atproto-0.1.0/setup.cfg +4 -0
  5. neco_atproto-0.1.0/src/neco_atproto/__init__.py +60 -0
  6. neco_atproto-0.1.0/src/neco_atproto/adapter.py +2039 -0
  7. neco_atproto-0.1.0/src/neco_atproto/car.py +85 -0
  8. neco_atproto-0.1.0/src/neco_atproto/drisl.py +290 -0
  9. neco_atproto-0.1.0/src/neco_atproto/goals.py +288 -0
  10. neco_atproto-0.1.0/src/neco_atproto/goals_catalog.json.gz +0 -0
  11. neco_atproto-0.1.0/src/neco_atproto/lexicon.py +52263 -0
  12. neco_atproto-0.1.0/src/neco_atproto/network_binding.py +370 -0
  13. neco_atproto-0.1.0/src/neco_atproto/permission.py +512 -0
  14. neco_atproto-0.1.0/src/neco_atproto/stream.py +197 -0
  15. neco_atproto-0.1.0/src/neco_atproto/wire.py +412 -0
  16. neco_atproto-0.1.0/src/neco_atproto.egg-info/PKG-INFO +65 -0
  17. neco_atproto-0.1.0/src/neco_atproto.egg-info/SOURCES.txt +26 -0
  18. neco_atproto-0.1.0/src/neco_atproto.egg-info/dependency_links.txt +1 -0
  19. neco_atproto-0.1.0/src/neco_atproto.egg-info/requires.txt +5 -0
  20. neco_atproto-0.1.0/src/neco_atproto.egg-info/top_level.txt +1 -0
  21. neco_atproto-0.1.0/tests/test_goals.py +150 -0
  22. neco_atproto-0.1.0/tests/test_permission.py +274 -0
  23. neco_atproto-0.1.0/tests/test_permission_admission.py +228 -0
  24. neco_atproto-0.1.0/tests/test_permission_auxiliary.py +217 -0
  25. neco_atproto-0.1.0/tests/test_pure_decoders.py +223 -0
  26. neco_atproto-0.1.0/tests/test_retry_rule_set.py +214 -0
  27. neco_atproto-0.1.0/tests/test_stream_message_schema.py +216 -0
  28. neco_atproto-0.1.0/tests/test_wire.py +328 -0
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: neco-atproto
3
+ Version: 0.1.0
4
+ Summary: AT Protocol Lexicon types, codecs, DRISL/CAR, permission sets, and goal catalog for Python
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/barineco/neco-atproto
7
+ Project-URL: Repository, https://github.com/barineco/neco-atproto
8
+ Requires-Python: >=3.14
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: necoherence==0.3.0
11
+ Requires-Dist: necoherence-http-adapter==0.3.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest; extra == "dev"
14
+
15
+ # neco-atproto (Python SDK)
16
+
17
+ [日本語](README-ja.md) | [Project overview](../../README.md)
18
+
19
+ AT Protocol Python SDK providing Lexicon-generated types and codecs, pure DRISL, CAR, and firehose decoders, XRPC wire codecs, permission-set evaluation, and goal execution.
20
+
21
+ Requires Python 3.14 or later with `necoherence` 0.3.0 and its HTTP adapter.
22
+
23
+ ## Installation
24
+
25
+ ```sh
26
+ pip install ./packages/python
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ ```python
32
+ from neco_atproto import adapter, encode_query, operation_value
33
+
34
+ operation = operation_value("app.bsky.feed.searchPosts")
35
+ params = adapter.codec(operation.declaration["params"]).decoder({"q": "atproto"})
36
+ query = encode_query(operation, params)
37
+ ```
38
+
39
+ ## Modules
40
+
41
+ | Module | Role |
42
+ |---|---|
43
+ | `neco_atproto.lexicon` | Lexicon-derived types and value codecs |
44
+ | `neco_atproto.adapter` | Type descriptors, default-aware decoding, grapheme counts, and rkey validation |
45
+ | `neco_atproto.drisl` | Pure deterministic CBOR decoder |
46
+ | `neco_atproto.car` | Pure bounded CAR v1 archive decoder |
47
+ | `neco_atproto.stream` | Firehose frame decoding and schema validation |
48
+ | `neco_atproto.wire` | XRPC request encoding, response decoding, and error classification |
49
+ | `neco_atproto.permission` | Permission-set admission, interpretation, and authorization |
50
+ | `neco_atproto.goals` | Goal and recipe execution backed by `goals_catalog.json.gz` |
51
+ | `neco_atproto.network_binding` | Single-operation HTTP execution (`HttpNetworkExecutor`) and retry policy |
52
+
53
+ See [docs/languages.md](../../docs/languages.md) for cross-language correspondence and [docs/terminology.md](../../docs/terminology.md) for concept definitions.
54
+
55
+ ## Verification
56
+
57
+ ```sh
58
+ python3 codegen/scripts/fetch-sources.py --group car-fixture
59
+ pip install -e "packages/python[dev]"
60
+ (cd packages/python && python3 -m pytest tests)
61
+ ```
62
+
63
+ ## License
64
+
65
+ [MIT License](../../LICENSE)
@@ -0,0 +1,51 @@
1
+ # neco-atproto (Python SDK)
2
+
3
+ [日本語](README-ja.md) | [Project overview](../../README.md)
4
+
5
+ AT Protocol Python SDK providing Lexicon-generated types and codecs, pure DRISL, CAR, and firehose decoders, XRPC wire codecs, permission-set evaluation, and goal execution.
6
+
7
+ Requires Python 3.14 or later with `necoherence` 0.3.0 and its HTTP adapter.
8
+
9
+ ## Installation
10
+
11
+ ```sh
12
+ pip install ./packages/python
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ```python
18
+ from neco_atproto import adapter, encode_query, operation_value
19
+
20
+ operation = operation_value("app.bsky.feed.searchPosts")
21
+ params = adapter.codec(operation.declaration["params"]).decoder({"q": "atproto"})
22
+ query = encode_query(operation, params)
23
+ ```
24
+
25
+ ## Modules
26
+
27
+ | Module | Role |
28
+ |---|---|
29
+ | `neco_atproto.lexicon` | Lexicon-derived types and value codecs |
30
+ | `neco_atproto.adapter` | Type descriptors, default-aware decoding, grapheme counts, and rkey validation |
31
+ | `neco_atproto.drisl` | Pure deterministic CBOR decoder |
32
+ | `neco_atproto.car` | Pure bounded CAR v1 archive decoder |
33
+ | `neco_atproto.stream` | Firehose frame decoding and schema validation |
34
+ | `neco_atproto.wire` | XRPC request encoding, response decoding, and error classification |
35
+ | `neco_atproto.permission` | Permission-set admission, interpretation, and authorization |
36
+ | `neco_atproto.goals` | Goal and recipe execution backed by `goals_catalog.json.gz` |
37
+ | `neco_atproto.network_binding` | Single-operation HTTP execution (`HttpNetworkExecutor`) and retry policy |
38
+
39
+ See [docs/languages.md](../../docs/languages.md) for cross-language correspondence and [docs/terminology.md](../../docs/terminology.md) for concept definitions.
40
+
41
+ ## Verification
42
+
43
+ ```sh
44
+ python3 codegen/scripts/fetch-sources.py --group car-fixture
45
+ pip install -e "packages/python[dev]"
46
+ (cd packages/python && python3 -m pytest tests)
47
+ ```
48
+
49
+ ## License
50
+
51
+ [MIT License](../../LICENSE)
@@ -0,0 +1,28 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "neco-atproto"
7
+ version = "0.1.0"
8
+ description = "AT Protocol Lexicon types, codecs, DRISL/CAR, permission sets, and goal catalog for Python"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.14"
12
+ dependencies = ["necoherence==0.3.0", "necoherence-http-adapter==0.3.0"]
13
+
14
+ [project.urls]
15
+ Homepage = "https://github.com/barineco/neco-atproto"
16
+ Repository = "https://github.com/barineco/neco-atproto"
17
+
18
+ [tool.setuptools.packages.find]
19
+ where = ["src"]
20
+
21
+ [tool.setuptools.package-data]
22
+ neco_atproto = ["goals_catalog.json.gz"]
23
+
24
+ [project.optional-dependencies]
25
+ dev = ["pytest"]
26
+
27
+ [tool.pytest.ini_options]
28
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,60 @@
1
+ from .network_binding import *
2
+ from .drisl import CidLink, DecodeFailure, DrislValue, SourceEvidence, decode_drisl, normalize_drisl, normalize_failure
3
+ from .car import CarBlock, CarEnvelope, CarLimits, decode_car, normalize_car
4
+ from .stream import (
5
+ ErrorFrame,
6
+ IgnoredFrame,
7
+ MessageFailure,
8
+ MessageCodecFailure,
9
+ MessageSchemaFailure,
10
+ MessageStructuralFailure,
11
+ RawStreamFrame,
12
+ SubscribeReposMessage,
13
+ decode_frame,
14
+ decode_message,
15
+ normalize_frame,
16
+ normalize_message,
17
+ )
18
+ from . import adapter, goals, lexicon, permission
19
+ from .permission import (
20
+ Authorization,
21
+ IncludeContext,
22
+ PermissionDocument,
23
+ PermissionDocumentFailure,
24
+ PermissionDomain,
25
+ PermissionRequest,
26
+ RepoAction,
27
+ RepoRequest,
28
+ Resolved,
29
+ RpcRequest,
30
+ Unavailable,
31
+ admit_permission_set_document,
32
+ authorize_permission,
33
+ authorize_permission_set,
34
+ interpret_permission,
35
+ namespace_authority,
36
+ )
37
+ from .wire import (
38
+ DeclaredErrorResult,
39
+ DecodedOutput,
40
+ ErrorResult,
41
+ ErrorSchemaViolation,
42
+ NonJsonFailure,
43
+ OperationValue,
44
+ UNIT,
45
+ Unit,
46
+ UnknownErrorResult,
47
+ WireFailure,
48
+ WireRequest,
49
+ decode_error,
50
+ decode_output,
51
+ encode_query,
52
+ encode_request,
53
+ method_path,
54
+ normalize_error,
55
+ normalize_operation,
56
+ normalize_output,
57
+ normalize_request,
58
+ normalize_wire_failure,
59
+ operation_value,
60
+ )