async_instalib 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.
- async_instalib-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
- async_instalib-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- async_instalib-0.1.0/.github/pull_request_template.md +10 -0
- async_instalib-0.1.0/.github/workflows/ci.yml +33 -0
- async_instalib-0.1.0/.github/workflows/release.yml +83 -0
- async_instalib-0.1.0/.gitignore +20 -0
- async_instalib-0.1.0/LICENSE +21 -0
- async_instalib-0.1.0/PKG-INFO +1205 -0
- async_instalib-0.1.0/README.md +1183 -0
- async_instalib-0.1.0/assets/banner.png +0 -0
- async_instalib-0.1.0/examples/configured_client.py +76 -0
- async_instalib-0.1.0/examples/people.py +82 -0
- async_instalib-0.1.0/examples/posts.py +77 -0
- async_instalib-0.1.0/pyproject.toml +54 -0
- async_instalib-0.1.0/src/async_instalib/__init__.py +225 -0
- async_instalib-0.1.0/src/async_instalib/__main__.py +6 -0
- async_instalib-0.1.0/src/async_instalib/auth/__init__.py +8 -0
- async_instalib-0.1.0/src/async_instalib/auth/bloks.py +146 -0
- async_instalib-0.1.0/src/async_instalib/auth/caa.py +254 -0
- async_instalib-0.1.0/src/async_instalib/auth/password.py +49 -0
- async_instalib-0.1.0/src/async_instalib/auth/service.py +189 -0
- async_instalib-0.1.0/src/async_instalib/cli.py +115 -0
- async_instalib-0.1.0/src/async_instalib/client.py +114 -0
- async_instalib-0.1.0/src/async_instalib/config/__init__.py +8 -0
- async_instalib-0.1.0/src/async_instalib/config/about.py +78 -0
- async_instalib-0.1.0/src/async_instalib/config/auth.py +62 -0
- async_instalib-0.1.0/src/async_instalib/config/comments.py +29 -0
- async_instalib-0.1.0/src/async_instalib/config/content.py +195 -0
- async_instalib-0.1.0/src/async_instalib/config/devices.py +58 -0
- async_instalib-0.1.0/src/async_instalib/config/direct.py +19 -0
- async_instalib-0.1.0/src/async_instalib/config/metadata.py +47 -0
- async_instalib-0.1.0/src/async_instalib/config/muted.py +23 -0
- async_instalib-0.1.0/src/async_instalib/config/options.py +108 -0
- async_instalib-0.1.0/src/async_instalib/config/people.py +54 -0
- async_instalib-0.1.0/src/async_instalib/config/policy.py +31 -0
- async_instalib-0.1.0/src/async_instalib/config/posts.py +184 -0
- async_instalib-0.1.0/src/async_instalib/config/profile.py +48 -0
- async_instalib-0.1.0/src/async_instalib/config/relationship_lists.py +52 -0
- async_instalib-0.1.0/src/async_instalib/config/relationships.py +188 -0
- async_instalib-0.1.0/src/async_instalib/config/validation.py +11 -0
- async_instalib-0.1.0/src/async_instalib/exceptions.py +89 -0
- async_instalib-0.1.0/src/async_instalib/models/__init__.py +9 -0
- async_instalib-0.1.0/src/async_instalib/models/about.py +107 -0
- async_instalib-0.1.0/src/async_instalib/models/activity.py +58 -0
- async_instalib-0.1.0/src/async_instalib/models/comments.py +49 -0
- async_instalib-0.1.0/src/async_instalib/models/content.py +50 -0
- async_instalib-0.1.0/src/async_instalib/models/direct.py +91 -0
- async_instalib-0.1.0/src/async_instalib/models/muted.py +23 -0
- async_instalib-0.1.0/src/async_instalib/models/pagination.py +90 -0
- async_instalib-0.1.0/src/async_instalib/models/people.py +172 -0
- async_instalib-0.1.0/src/async_instalib/models/posts.py +96 -0
- async_instalib-0.1.0/src/async_instalib/models/stories.py +245 -0
- async_instalib-0.1.0/src/async_instalib/models/uploads.py +196 -0
- async_instalib-0.1.0/src/async_instalib/models/user.py +31 -0
- async_instalib-0.1.0/src/async_instalib/py.typed +0 -0
- async_instalib-0.1.0/src/async_instalib/resources/__init__.py +5 -0
- async_instalib-0.1.0/src/async_instalib/resources/account.py +31 -0
- async_instalib-0.1.0/src/async_instalib/resources/activity.py +46 -0
- async_instalib-0.1.0/src/async_instalib/resources/comment_settings.py +148 -0
- async_instalib-0.1.0/src/async_instalib/resources/comments.py +285 -0
- async_instalib-0.1.0/src/async_instalib/resources/content.py +415 -0
- async_instalib-0.1.0/src/async_instalib/resources/direct.py +207 -0
- async_instalib-0.1.0/src/async_instalib/resources/direct_common.py +92 -0
- async_instalib-0.1.0/src/async_instalib/resources/direct_items.py +120 -0
- async_instalib-0.1.0/src/async_instalib/resources/direct_send.py +256 -0
- async_instalib-0.1.0/src/async_instalib/resources/highlights.py +97 -0
- async_instalib-0.1.0/src/async_instalib/resources/media_actions.py +199 -0
- async_instalib-0.1.0/src/async_instalib/resources/media_uploads.py +130 -0
- async_instalib-0.1.0/src/async_instalib/resources/muted_metadata.py +288 -0
- async_instalib-0.1.0/src/async_instalib/resources/people.py +179 -0
- async_instalib-0.1.0/src/async_instalib/resources/people_lists.py +194 -0
- async_instalib-0.1.0/src/async_instalib/resources/places.py +46 -0
- async_instalib-0.1.0/src/async_instalib/resources/posts.py +261 -0
- async_instalib-0.1.0/src/async_instalib/resources/profile_metadata.py +64 -0
- async_instalib-0.1.0/src/async_instalib/resources/profiles.py +229 -0
- async_instalib-0.1.0/src/async_instalib/resources/relationship_lists.py +242 -0
- async_instalib-0.1.0/src/async_instalib/resources/relationship_muting.py +129 -0
- async_instalib-0.1.0/src/async_instalib/resources/relationships.py +439 -0
- async_instalib-0.1.0/src/async_instalib/session/__init__.py +11 -0
- async_instalib-0.1.0/src/async_instalib/session/lease.py +32 -0
- async_instalib-0.1.0/src/async_instalib/session/state.py +201 -0
- async_instalib-0.1.0/src/async_instalib/transport/__init__.py +9 -0
- async_instalib-0.1.0/src/async_instalib/transport/graphql.py +284 -0
- async_instalib-0.1.0/src/async_instalib/transport/guard.py +58 -0
- async_instalib-0.1.0/src/async_instalib/transport/http.py +374 -0
- async_instalib-0.1.0/src/async_instalib/transport/response.py +146 -0
- async_instalib-0.1.0/src/async_instalib/transport/upload.py +108 -0
- async_instalib-0.1.0/src/async_instalib/triggers/__init__.py +55 -0
- async_instalib-0.1.0/src/async_instalib/triggers/events.py +72 -0
- async_instalib-0.1.0/src/async_instalib/triggers/runner.py +143 -0
- async_instalib-0.1.0/src/async_instalib/triggers/sources.py +188 -0
- async_instalib-0.1.0/src/async_instalib/triggers/state.py +57 -0
- async_instalib-0.1.0/src/async_instalib/triggers/webhooks.py +96 -0
- async_instalib-0.1.0/tests/conftest.py +60 -0
- async_instalib-0.1.0/tests/test_about_details.py +103 -0
- async_instalib-0.1.0/tests/test_auth.py +190 -0
- async_instalib-0.1.0/tests/test_caa.py +136 -0
- async_instalib-0.1.0/tests/test_comment_settings.py +114 -0
- async_instalib-0.1.0/tests/test_comments.py +233 -0
- async_instalib-0.1.0/tests/test_configuration.py +92 -0
- async_instalib-0.1.0/tests/test_content.py +380 -0
- async_instalib-0.1.0/tests/test_devices.py +63 -0
- async_instalib-0.1.0/tests/test_direct.py +182 -0
- async_instalib-0.1.0/tests/test_direct_send.py +247 -0
- async_instalib-0.1.0/tests/test_direct_triggers.py +97 -0
- async_instalib-0.1.0/tests/test_dx.py +167 -0
- async_instalib-0.1.0/tests/test_follow_requests_list.py +158 -0
- async_instalib-0.1.0/tests/test_graphql.py +350 -0
- async_instalib-0.1.0/tests/test_graphql_metadata.py +144 -0
- async_instalib-0.1.0/tests/test_highlight_items.py +119 -0
- async_instalib-0.1.0/tests/test_highlights_places.py +154 -0
- async_instalib-0.1.0/tests/test_muted_accounts_resource.py +100 -0
- async_instalib-0.1.0/tests/test_muted_metadata.py +181 -0
- async_instalib-0.1.0/tests/test_mutual_followers.py +120 -0
- async_instalib-0.1.0/tests/test_people.py +221 -0
- async_instalib-0.1.0/tests/test_people_lists.py +298 -0
- async_instalib-0.1.0/tests/test_people_loopback.py +151 -0
- async_instalib-0.1.0/tests/test_people_models.py +133 -0
- async_instalib-0.1.0/tests/test_people_resolution.py +200 -0
- async_instalib-0.1.0/tests/test_policy.py +147 -0
- async_instalib-0.1.0/tests/test_post_media.py +207 -0
- async_instalib-0.1.0/tests/test_post_uploads.py +191 -0
- async_instalib-0.1.0/tests/test_posts_publish.py +295 -0
- async_instalib-0.1.0/tests/test_profiles.py +133 -0
- async_instalib-0.1.0/tests/test_profiles_about.py +194 -0
- async_instalib-0.1.0/tests/test_relationship_boundaries.py +85 -0
- async_instalib-0.1.0/tests/test_relationship_controls.py +412 -0
- async_instalib-0.1.0/tests/test_relationship_lists.py +379 -0
- async_instalib-0.1.0/tests/test_relationship_muting.py +273 -0
- async_instalib-0.1.0/tests/test_relationships.py +332 -0
- async_instalib-0.1.0/tests/test_reposts.py +84 -0
- async_instalib-0.1.0/tests/test_search_pagination.py +135 -0
- async_instalib-0.1.0/tests/test_session.py +45 -0
- async_instalib-0.1.0/tests/test_story_metadata.py +138 -0
- async_instalib-0.1.0/tests/test_transport.py +201 -0
- async_instalib-0.1.0/tests/test_triggers.py +251 -0
- async_instalib-0.1.0/uv.lock +761 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a reproducible problem with the library
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### What happened?
|
|
7
|
+
|
|
8
|
+
Describe the actual and expected behavior.
|
|
9
|
+
|
|
10
|
+
### Minimal reproduction
|
|
11
|
+
|
|
12
|
+
Use synthetic inputs. Remove credentials, session data and private account details.
|
|
13
|
+
|
|
14
|
+
### Environment
|
|
15
|
+
|
|
16
|
+
- Package version or commit:
|
|
17
|
+
- Python version:
|
|
18
|
+
- Operating system:
|
|
19
|
+
|
|
20
|
+
### Redacted error
|
|
21
|
+
|
|
22
|
+
Include the exception type and relevant traceback, without raw response bodies.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Describe a missing capability or improvement
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### Use case
|
|
7
|
+
|
|
8
|
+
What are you trying to accomplish?
|
|
9
|
+
|
|
10
|
+
### Proposed behavior
|
|
11
|
+
|
|
12
|
+
Describe the public method or workflow you would like.
|
|
13
|
+
|
|
14
|
+
### Evidence and constraints
|
|
15
|
+
|
|
16
|
+
Link public documentation or describe observed behavior. Do not attach credentials,
|
|
17
|
+
private captures or account data.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Change
|
|
2
|
+
|
|
3
|
+
Describe the problem and resulting behavior.
|
|
4
|
+
|
|
5
|
+
## Verification
|
|
6
|
+
|
|
7
|
+
List checks run and distinguish synthetic tests from live verification.
|
|
8
|
+
|
|
9
|
+
- [ ] Public behavior changes are documented in README.md.
|
|
10
|
+
- [ ] Tests and examples contain only synthetic data.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
pull_request:
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
workflow_call:
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
jobs:
|
|
13
|
+
check:
|
|
14
|
+
name: ${{ matrix.os }} / Python ${{ matrix.python }}
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
timeout-minutes: 15
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os: [ubuntu-latest, macos-latest]
|
|
21
|
+
python: ['3.11', '3.13']
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
24
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python }}
|
|
27
|
+
enable-cache: true
|
|
28
|
+
- run: uv sync --locked
|
|
29
|
+
- run: uv run ruff check src tests examples
|
|
30
|
+
- run: uv run ruff format --check src tests examples
|
|
31
|
+
- run: uv run mypy src
|
|
32
|
+
- run: uv run pytest -q
|
|
33
|
+
- run: uv build
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
concurrency:
|
|
8
|
+
group: pypi-${{ github.repository }}
|
|
9
|
+
cancel-in-progress: false
|
|
10
|
+
jobs:
|
|
11
|
+
checks:
|
|
12
|
+
uses: ./.github/workflows/ci.yml
|
|
13
|
+
build:
|
|
14
|
+
needs: checks
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
timeout-minutes: 10
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: '3.11'
|
|
24
|
+
- name: Validate release tag and source
|
|
25
|
+
env:
|
|
26
|
+
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
|
27
|
+
run: |
|
|
28
|
+
git merge-base --is-ancestor HEAD origin/main
|
|
29
|
+
uv run --no-project python - <<'PYTHON'
|
|
30
|
+
import os, tomllib
|
|
31
|
+
from pathlib import Path
|
|
32
|
+
version = tomllib.loads(Path("pyproject.toml").read_text())["project"]["version"]
|
|
33
|
+
if os.environ["RELEASE_TAG"] != f"v{version}":
|
|
34
|
+
raise SystemExit(f"Release tag must be v{version}")
|
|
35
|
+
PYTHON
|
|
36
|
+
- run: uv build
|
|
37
|
+
- run: uvx twine check --strict dist/*
|
|
38
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
|
39
|
+
with:
|
|
40
|
+
name: distributions
|
|
41
|
+
path: dist/*
|
|
42
|
+
if-no-files-found: error
|
|
43
|
+
retention-days: 7
|
|
44
|
+
publish:
|
|
45
|
+
needs: build
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
timeout-minutes: 10
|
|
48
|
+
environment:
|
|
49
|
+
name: pypi
|
|
50
|
+
url: https://pypi.org/p/async_instalib
|
|
51
|
+
permissions:
|
|
52
|
+
id-token: write
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
55
|
+
with:
|
|
56
|
+
name: distributions
|
|
57
|
+
path: dist/
|
|
58
|
+
- name: Verify any previously published files
|
|
59
|
+
run: |
|
|
60
|
+
python - <<'PYTHON'
|
|
61
|
+
import hashlib, json, urllib.error, urllib.request
|
|
62
|
+
from pathlib import Path
|
|
63
|
+
try:
|
|
64
|
+
with urllib.request.urlopen("https://pypi.org/pypi/async_instalib/json") as response:
|
|
65
|
+
project = json.load(response)
|
|
66
|
+
except urllib.error.HTTPError as error:
|
|
67
|
+
if error.code != 404:
|
|
68
|
+
raise
|
|
69
|
+
project = {"releases": {}}
|
|
70
|
+
published = {
|
|
71
|
+
item["filename"]: item["digests"]["sha256"]
|
|
72
|
+
for release in project["releases"].values() for item in release
|
|
73
|
+
}
|
|
74
|
+
for artifact in Path("dist").iterdir():
|
|
75
|
+
expected = published.get(artifact.name)
|
|
76
|
+
actual = hashlib.sha256(artifact.read_bytes()).hexdigest()
|
|
77
|
+
if expected is not None and expected != actual:
|
|
78
|
+
raise SystemExit(f"Existing PyPI file differs: {artifact.name}")
|
|
79
|
+
PYTHON
|
|
80
|
+
- name: Publish distributions
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # release/v1
|
|
82
|
+
with:
|
|
83
|
+
skip-existing: true
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
.pytest_cache/
|
|
4
|
+
.ruff_cache/
|
|
5
|
+
.mypy_cache/
|
|
6
|
+
dist/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.env
|
|
9
|
+
.env.*
|
|
10
|
+
*.session.json
|
|
11
|
+
*.har
|
|
12
|
+
*.mitm
|
|
13
|
+
.DS_Store
|
|
14
|
+
*.py[cod]
|
|
15
|
+
build/
|
|
16
|
+
*.session.json.lock
|
|
17
|
+
*.pem
|
|
18
|
+
*.key
|
|
19
|
+
.coverage
|
|
20
|
+
htmlcov/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anandesh Sharma
|
|
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.
|