pdsx 0.0.1a1__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.
pdsx-0.0.1a1/.env ADDED
@@ -0,0 +1,2 @@
1
+ ATPROTO_HANDLE=zzstoatzzdevlog.bsky.social
2
+ ATPROTO_PASSWORD=YFQ_mwe3txc7hvt*hek
@@ -0,0 +1,73 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - "src/**"
7
+ - "tests/**"
8
+ - "pyproject.toml"
9
+ - "uv.lock"
10
+ - ".pre-commit-config.yaml"
11
+ - ".github/workflows/ci.yml"
12
+ push:
13
+ branches: [main]
14
+ paths:
15
+ - "src/**"
16
+ - "tests/**"
17
+ - "pyproject.toml"
18
+ - "uv.lock"
19
+ - ".pre-commit-config.yaml"
20
+ - ".github/workflows/ci.yml"
21
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ pre-commit:
27
+ timeout-minutes: 5
28
+ runs-on: ubuntu-latest
29
+
30
+ steps:
31
+ - uses: actions/checkout@v5
32
+
33
+ - name: install uv
34
+ uses: astral-sh/setup-uv@v7
35
+ with:
36
+ enable-cache: true
37
+ cache-dependency-glob: "uv.lock"
38
+
39
+ - name: install dependencies
40
+ run: uv sync
41
+
42
+ - name: check lockfile is up to date
43
+ run: |
44
+ if ! uv lock --check; then
45
+ echo "❌ lockfile is out of date!"
46
+ echo "to update the lockfile, run 'uv lock'."
47
+ exit 1
48
+ fi
49
+ echo "✅ lockfile is up to date"
50
+
51
+ - name: run prek
52
+ run: uv run prek run --all-files
53
+ env:
54
+ SKIP: no-commit-to-branch
55
+
56
+ test:
57
+ timeout-minutes: 5
58
+ runs-on: ubuntu-latest
59
+
60
+ steps:
61
+ - uses: actions/checkout@v5
62
+
63
+ - name: install uv
64
+ uses: astral-sh/setup-uv@v7
65
+ with:
66
+ enable-cache: true
67
+ cache-dependency-glob: "uv.lock"
68
+
69
+ - name: install dependencies
70
+ run: uv sync
71
+
72
+ - name: run tests
73
+ run: uv run pytest -v
@@ -0,0 +1,26 @@
1
+ name: Publish pdsx to PyPI
2
+ on:
3
+ release:
4
+ types: [published]
5
+ workflow_dispatch:
6
+
7
+ jobs:
8
+ pypi-publish:
9
+ name: Upload to PyPI
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ id-token: write # For PyPI's trusted publishing
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v5
16
+ with:
17
+ fetch-depth: 0
18
+
19
+ - name: "Install uv"
20
+ uses: astral-sh/setup-uv@v7
21
+
22
+ - name: Build
23
+ run: uv build
24
+
25
+ - name: Publish to PyPI
26
+ run: uv publish -v dist/*
@@ -0,0 +1,10 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
@@ -0,0 +1,30 @@
1
+ fail_fast: false
2
+
3
+ repos:
4
+ - repo: https://github.com/abravalheri/validate-pyproject
5
+ rev: v0.24.1
6
+ hooks:
7
+ - id: validate-pyproject
8
+
9
+ - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ rev: v0.12.1
11
+ hooks:
12
+ - id: ruff-check
13
+ args: [--fix, --exit-non-zero-on-fix]
14
+ - id: ruff-format
15
+
16
+ - repo: local
17
+ hooks:
18
+ - id: type-check
19
+ name: type check
20
+ entry: uv run ty check
21
+ language: system
22
+ types: [python]
23
+ pass_filenames: false
24
+
25
+ - repo: https://github.com/pre-commit/pre-commit-hooks
26
+ rev: v6.0.0
27
+ hooks:
28
+ - id: no-commit-to-branch
29
+ name: prevent commits to main
30
+ args: [--branch, main]
@@ -0,0 +1 @@
1
+ 3.14
pdsx-0.0.1a1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 zzstoatzz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pdsx-0.0.1a1/PKG-INFO ADDED
@@ -0,0 +1,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: pdsx
3
+ Version: 0.0.1a1
4
+ Summary: general-purpose cli for atproto record operations
5
+ Author-email: zzstoatzz <thrast36@gmail.com>
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: atproto,bluesky,cli,pds,records
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: atproto>=0.0.63
22
+ Requires-Dist: pydantic-settings>=2.7.0
23
+ Requires-Dist: rich>=13.0.0
24
+ Description-Content-Type: text/markdown
25
+
26
+ # pdsx
27
+
28
+ general-purpose cli for atproto record operations
29
+
30
+ ## installation
31
+
32
+ ```bash
33
+ uv add pdsx
34
+ # or
35
+ uvx pdsx --help
36
+ ```
37
+
38
+ ## quick start
39
+
40
+ set your credentials:
41
+
42
+ ```bash
43
+ export ATPROTO_HANDLE=your.handle
44
+ export ATPROTO_PASSWORD=your-password
45
+ ```
46
+
47
+ list posts (compact format by default):
48
+
49
+ ```bash
50
+ pdsx ls app.bsky.feed.post --limit 10
51
+ ```
52
+
53
+ json output for jq:
54
+
55
+ ```bash
56
+ pdsx ls app.bsky.feed.post -o json | jq '.[].text'
57
+ ```
58
+
59
+ table view:
60
+
61
+ ```bash
62
+ pdsx ls app.bsky.feed.post -o table
63
+ ```
64
+
65
+ ## features
66
+
67
+ - crud operations for atproto records (list, get, create, update, delete)
68
+ - multiple output formats: compact (default), json, yaml, table
69
+ - unix-style command aliases: `ls`, `cat`, `rm`, `edit`, `touch`/`add`
70
+ - clean json output for jq/pipe interoperability
71
+ - tty-aware formatting
72
+ - type-safe with strict typing
73
+ - python 3.10+ support
74
+
75
+ ## usage
76
+
77
+ ### list records
78
+
79
+ ```bash
80
+ # using full command
81
+ pdsx list app.bsky.feed.post --limit 5
82
+
83
+ # using alias
84
+ pdsx ls app.bsky.feed.post --limit 5 -o json
85
+ ```
86
+
87
+ ### get a record
88
+
89
+ ```bash
90
+ # using full command
91
+ pdsx get at://did:plc:example/app.bsky.feed.post/123
92
+
93
+ # using alias
94
+ pdsx cat at://did:plc:example/app.bsky.feed.post/123
95
+ ```
96
+
97
+ ### create a record
98
+
99
+ ```bash
100
+ pdsx create app.bsky.feed.like subject='at://...' createdAt='2024-01-01T00:00:00Z'
101
+
102
+ # using alias
103
+ pdsx touch app.bsky.feed.like subject='at://...' createdAt='2024-01-01T00:00:00Z'
104
+ ```
105
+
106
+ ### update a record
107
+
108
+ ```bash
109
+ pdsx update at://did:plc:example/app.bsky.feed.post/123 text='updated text'
110
+
111
+ # using alias
112
+ pdsx edit at://did:plc:example/app.bsky.feed.post/123 text='updated text'
113
+ ```
114
+
115
+ ### delete a record
116
+
117
+ ```bash
118
+ pdsx delete at://did:plc:example/app.bsky.feed.post/123
119
+
120
+ # using alias
121
+ pdsx rm at://did:plc:example/app.bsky.feed.post/123
122
+ ```
123
+
124
+ ## output formats
125
+
126
+ ### compact (default)
127
+
128
+ one line per record with json:
129
+
130
+ ```
131
+ app.bsky.feed.post (3 records)
132
+ 3m4ryxwq5dt2i: {"created_at":"2025-11-04T07:25:17.061883+00:00","text":"..."}
133
+ 3m4ryxvw4l32z: {"created_at":"2025-11-04T07:25:16.201083+00:00","text":"..."}
134
+ ```
135
+
136
+ ### json
137
+
138
+ clean json for piping to jq:
139
+
140
+ ```bash
141
+ pdsx ls app.bsky.feed.post -o json | jq '.[].text'
142
+ ```
143
+
144
+ ### table
145
+
146
+ pretty table for terminal viewing:
147
+
148
+ ```bash
149
+ pdsx ls app.bsky.feed.post -o table
150
+ ```
151
+
152
+ ## examples
153
+
154
+ <details>
155
+ <summary>click to see real-world examples</summary>
156
+
157
+ ### read anyone's bio
158
+ ```bash
159
+ uvx pdsx --repo did:plc:o53crari67ge7bvbv273lxln list app.bsky.actor.profile -o json | \
160
+ jq -r '.[0].description'
161
+ ```
162
+
163
+ ### update your bio
164
+ ```bash
165
+ export ATPROTO_HANDLE=your.handle ATPROTO_PASSWORD=your-password
166
+ uvx pdsx edit app.bsky.actor.profile/self description='new bio'
167
+ ```
168
+
169
+ ### read anyone's posts
170
+ ```bash
171
+ uvx pdsx -r did:plc:o53crari67ge7bvbv273lxln list app.bsky.feed.post --limit 5 -o json | \
172
+ jq -r '.[] | .text'
173
+ ```
174
+
175
+ **atproto gives you full read access to anyone's public data. auth only required for writes.**
176
+
177
+ </details>
178
+
179
+ ## development
180
+
181
+ ```bash
182
+ # clone repo
183
+ git clone https://github.com/zzstoatzz/pdsx
184
+ cd pdsx
185
+
186
+ # install with dev dependencies
187
+ uv sync
188
+
189
+ # run tests
190
+ uv run pytest
191
+
192
+ # run type checker
193
+ uv run ty check
194
+
195
+ # run pre-commit hooks
196
+ uv run prek run --all-files
197
+ ```
198
+
199
+ ## license
200
+
201
+ mit
pdsx-0.0.1a1/README.md ADDED
@@ -0,0 +1,176 @@
1
+ # pdsx
2
+
3
+ general-purpose cli for atproto record operations
4
+
5
+ ## installation
6
+
7
+ ```bash
8
+ uv add pdsx
9
+ # or
10
+ uvx pdsx --help
11
+ ```
12
+
13
+ ## quick start
14
+
15
+ set your credentials:
16
+
17
+ ```bash
18
+ export ATPROTO_HANDLE=your.handle
19
+ export ATPROTO_PASSWORD=your-password
20
+ ```
21
+
22
+ list posts (compact format by default):
23
+
24
+ ```bash
25
+ pdsx ls app.bsky.feed.post --limit 10
26
+ ```
27
+
28
+ json output for jq:
29
+
30
+ ```bash
31
+ pdsx ls app.bsky.feed.post -o json | jq '.[].text'
32
+ ```
33
+
34
+ table view:
35
+
36
+ ```bash
37
+ pdsx ls app.bsky.feed.post -o table
38
+ ```
39
+
40
+ ## features
41
+
42
+ - crud operations for atproto records (list, get, create, update, delete)
43
+ - multiple output formats: compact (default), json, yaml, table
44
+ - unix-style command aliases: `ls`, `cat`, `rm`, `edit`, `touch`/`add`
45
+ - clean json output for jq/pipe interoperability
46
+ - tty-aware formatting
47
+ - type-safe with strict typing
48
+ - python 3.10+ support
49
+
50
+ ## usage
51
+
52
+ ### list records
53
+
54
+ ```bash
55
+ # using full command
56
+ pdsx list app.bsky.feed.post --limit 5
57
+
58
+ # using alias
59
+ pdsx ls app.bsky.feed.post --limit 5 -o json
60
+ ```
61
+
62
+ ### get a record
63
+
64
+ ```bash
65
+ # using full command
66
+ pdsx get at://did:plc:example/app.bsky.feed.post/123
67
+
68
+ # using alias
69
+ pdsx cat at://did:plc:example/app.bsky.feed.post/123
70
+ ```
71
+
72
+ ### create a record
73
+
74
+ ```bash
75
+ pdsx create app.bsky.feed.like subject='at://...' createdAt='2024-01-01T00:00:00Z'
76
+
77
+ # using alias
78
+ pdsx touch app.bsky.feed.like subject='at://...' createdAt='2024-01-01T00:00:00Z'
79
+ ```
80
+
81
+ ### update a record
82
+
83
+ ```bash
84
+ pdsx update at://did:plc:example/app.bsky.feed.post/123 text='updated text'
85
+
86
+ # using alias
87
+ pdsx edit at://did:plc:example/app.bsky.feed.post/123 text='updated text'
88
+ ```
89
+
90
+ ### delete a record
91
+
92
+ ```bash
93
+ pdsx delete at://did:plc:example/app.bsky.feed.post/123
94
+
95
+ # using alias
96
+ pdsx rm at://did:plc:example/app.bsky.feed.post/123
97
+ ```
98
+
99
+ ## output formats
100
+
101
+ ### compact (default)
102
+
103
+ one line per record with json:
104
+
105
+ ```
106
+ app.bsky.feed.post (3 records)
107
+ 3m4ryxwq5dt2i: {"created_at":"2025-11-04T07:25:17.061883+00:00","text":"..."}
108
+ 3m4ryxvw4l32z: {"created_at":"2025-11-04T07:25:16.201083+00:00","text":"..."}
109
+ ```
110
+
111
+ ### json
112
+
113
+ clean json for piping to jq:
114
+
115
+ ```bash
116
+ pdsx ls app.bsky.feed.post -o json | jq '.[].text'
117
+ ```
118
+
119
+ ### table
120
+
121
+ pretty table for terminal viewing:
122
+
123
+ ```bash
124
+ pdsx ls app.bsky.feed.post -o table
125
+ ```
126
+
127
+ ## examples
128
+
129
+ <details>
130
+ <summary>click to see real-world examples</summary>
131
+
132
+ ### read anyone's bio
133
+ ```bash
134
+ uvx pdsx --repo did:plc:o53crari67ge7bvbv273lxln list app.bsky.actor.profile -o json | \
135
+ jq -r '.[0].description'
136
+ ```
137
+
138
+ ### update your bio
139
+ ```bash
140
+ export ATPROTO_HANDLE=your.handle ATPROTO_PASSWORD=your-password
141
+ uvx pdsx edit app.bsky.actor.profile/self description='new bio'
142
+ ```
143
+
144
+ ### read anyone's posts
145
+ ```bash
146
+ uvx pdsx -r did:plc:o53crari67ge7bvbv273lxln list app.bsky.feed.post --limit 5 -o json | \
147
+ jq -r '.[] | .text'
148
+ ```
149
+
150
+ **atproto gives you full read access to anyone's public data. auth only required for writes.**
151
+
152
+ </details>
153
+
154
+ ## development
155
+
156
+ ```bash
157
+ # clone repo
158
+ git clone https://github.com/zzstoatzz/pdsx
159
+ cd pdsx
160
+
161
+ # install with dev dependencies
162
+ uv sync
163
+
164
+ # run tests
165
+ uv run pytest
166
+
167
+ # run type checker
168
+ uv run ty check
169
+
170
+ # run pre-commit hooks
171
+ uv run prek run --all-files
172
+ ```
173
+
174
+ ## license
175
+
176
+ mit
@@ -0,0 +1,19 @@
1
+ # pdsx examples
2
+
3
+ ## read anyone's bio
4
+ ```bash
5
+ uvx pdsx --repo did:plc:o53crari67ge7bvbv273lxln list app.bsky.actor.profile -o json | jq -r '.[0].description'
6
+ ```
7
+
8
+ ## update your bio
9
+ ```bash
10
+ export ATPROTO_HANDLE=your.handle ATPROTO_PASSWORD=your-password
11
+ uvx pdsx edit app.bsky.actor.profile/self description='new bio'
12
+ ```
13
+
14
+ ## read anyone's posts
15
+ ```bash
16
+ uvx pdsx -r did:plc:o53crari67ge7bvbv273lxln list app.bsky.feed.post --limit 5 -o json | jq -r '.[] | .text'
17
+ ```
18
+
19
+ **atproto gives you full read access to anyone's public data. auth only required for writes.**
@@ -0,0 +1,117 @@
1
+ [project]
2
+ name = "pdsx"
3
+ dynamic = ["version"]
4
+ description = "general-purpose cli for atproto record operations"
5
+ readme = "README.md"
6
+ authors = [{ name = "zzstoatzz", email = "thrast36@gmail.com" }]
7
+ requires-python = ">=3.10"
8
+ license = "MIT"
9
+
10
+ keywords = ["atproto", "bluesky", "pds", "records", "cli"]
11
+
12
+ classifiers = [
13
+ "Development Status :: 3 - Alpha",
14
+ "Intended Audience :: Developers",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Programming Language :: Python :: 3",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Programming Language :: Python :: 3.14",
22
+ "Topic :: Software Development :: Libraries :: Python Modules",
23
+ "Typing :: Typed",
24
+ ]
25
+
26
+ dependencies = ["atproto>=0.0.63", "pydantic-settings>=2.7.0", "rich>=13.0.0"]
27
+
28
+ [project.scripts]
29
+ pdsx = "pdsx.cli:main"
30
+
31
+ [dependency-groups]
32
+ dev = [
33
+ "pytest>=8.3.0",
34
+ "pytest-asyncio>=0.25.0",
35
+ "pytest-sugar",
36
+ "ruff>=0.12.0",
37
+ "prek>=0.2.0",
38
+ "ty>=0.0.1a25",
39
+ ]
40
+
41
+ [build-system]
42
+ requires = ["hatchling", "uv-dynamic-versioning>=0.7.0"]
43
+ build-backend = "hatchling.build"
44
+
45
+ [tool.hatch.version]
46
+ source = "uv-dynamic-versioning"
47
+
48
+ [tool.uv-dynamic-versioning]
49
+ vcs = "git"
50
+ style = "pep440"
51
+ bump = true
52
+ fallback-version = "0.0.0"
53
+
54
+ [tool.pytest.ini_options]
55
+ asyncio_mode = "auto"
56
+ asyncio_default_fixture_loop_scope = "function"
57
+ pythonpath = ["."]
58
+ testpaths = ["tests"]
59
+ python_files = ["test_*.py", "*_test.py"]
60
+ python_classes = ["Test*"]
61
+ python_functions = ["test_*"]
62
+ filterwarnings = [
63
+ "ignore::pydantic._internal._generate_schema.UnsupportedFieldAttributeWarning",
64
+ ]
65
+
66
+ [tool.ruff.lint]
67
+ fixable = ["ALL"]
68
+ ignore = [
69
+ "COM812",
70
+ "PLR0913", # Too many arguments
71
+ "SIM102", # Dont require combining if statements
72
+ ]
73
+ extend-select = [
74
+ "B", # flake8-bugbear
75
+ "C4", # flake8-comprehensions
76
+ "I", # isort
77
+ "PIE", # flake8-pie
78
+ "RUF", # Ruff-specific
79
+ "SIM", # flake8-simplify
80
+ "UP", # pyupgrade
81
+ ]
82
+
83
+ [tool.ruff.lint.per-file-ignores]
84
+ "__init__.py" = ["F401", "I001"]
85
+ "tests/**/*.py" = ["S101"] # Allow assert in tests
86
+
87
+ [tool.coverage.run]
88
+ source = ["src"]
89
+ omit = ["tests/*", "sandbox/*"]
90
+
91
+ [tool.coverage.report]
92
+ exclude_lines = [
93
+ "pragma: no cover",
94
+ "def __repr__",
95
+ "raise AssertionError",
96
+ "raise NotImplementedError",
97
+ "if __name__ == .__main__.:",
98
+ "if TYPE_CHECKING:",
99
+ ]
100
+
101
+ [tool.ty.src]
102
+ include = ["src", "tests"]
103
+ exclude = [
104
+ "**/node_modules",
105
+ "**/__pycache__",
106
+ ".venv",
107
+ ".git",
108
+ "dist",
109
+ "sandbox",
110
+ ]
111
+
112
+ [tool.ty.environment]
113
+ python-version = "3.10"
114
+
115
+ [tool.ty.rules]
116
+ unknown-argument = "ignore"
117
+ no-matching-overload = "ignore"
@@ -0,0 +1,7 @@
1
+ """pdsx - general-purpose cli for atproto record operations."""
2
+
3
+ from __future__ import annotations
4
+
5
+ __version__ = "0.0.0"
6
+
7
+ __all__ = ["__version__"]
@@ -0,0 +1 @@
1
+ """internal utilities for pdsx."""