Add your description here
Project description
Solidarity Tech Tools
An unofficial python library to help you automate solidarity tech (ST).
See the ST api page for more details: https://www.solidarity.tech/reference/
This is still in beta, and there is a bit more work to do. But you can still use this in production if you are bold.
Features
Client
Call python methods to interact with the ST api. You can pass pydantic models and receive pydantic models in return, so you can rely on the response structure.
Todo: Contact Matching
Given a contact export and a ST account with contacts, attempt to match the two, so you can perform operations.
This is useful for example if you want to export migrate resources from one ST account to another, like notes or custom properties.
Using
- Add
solidaritytechtoolsas a dependency viauv add solidaritytechtools,pip install solidaritytechtools, etc - Import the client and models:
from solidaritytechtools import STClient, models - Use the client as a context manager:
from solidaritytechtools import STClient, models
with STClient(api_key="...") as client:
# Perform calls
users = client.get_users()
# When passing arguments, you can either pass a Pydantic model (recommended)...
user_1 = client.create_user(models.UserCreate(
chapter_id=1,
phone_number='4145551234'
))
# ...or a raw dict
user_2 = client.create_user({
"chapter_id": 1,
"phone_number": "4145551234"
})
Using Pydantic models provides better type safety and IDE autocompletion, but you can always fall back to a dict if the API spec drifts or a model is missing a field.
If you notice client functions not working as expected, feel free to use raw internal methods like client._get("path") or client._put("path", json=payload) to do what you need, and then submit an issue or a MR.
Contributing
- Clone the repo
- Install pre-commit hooks (
uv run pre-commit install) - Start coding and make a MR :)
Please use uv run ty check . to check the type safety of your code before submitting a MR.
When possible, ty check . will be added to pre-commit hooks.
Publishing
The maintainer will probably take care of this
uv version --bump patch(or minor, major etc)uv syncgit add pyproject.toml uv.lockgit commit -m "Release $(uv version)" && git tag v$(uv version --short)git push origin main --tags
Github workflow will push to pypi.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solidaritytechtools-0.1.0.tar.gz.
File metadata
- Download URL: solidaritytechtools-0.1.0.tar.gz
- Upload date:
- Size: 23.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8401758458c1ca8c860143c0b0da97b910dc096bea8954699e735309d9891760
|
|
| MD5 |
c4d3d16189a25404c8622db034e75bb5
|
|
| BLAKE2b-256 |
1996a19a539e699854fe344f87e3694298837af9d2d2b01ee7f2fe30f22b6cdc
|
Provenance
The following attestation bundles were made for solidaritytechtools-0.1.0.tar.gz:
Publisher:
workflow.yml on jackklika/solidaritytechtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solidaritytechtools-0.1.0.tar.gz -
Subject digest:
8401758458c1ca8c860143c0b0da97b910dc096bea8954699e735309d9891760 - Sigstore transparency entry: 844491706
- Sigstore integration time:
-
Permalink:
jackklika/solidaritytechtools@1c84b7f3f7a7ca33ba7e7608bb043961fc4e5c7d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jackklika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@1c84b7f3f7a7ca33ba7e7608bb043961fc4e5c7d -
Trigger Event:
push
-
Statement type:
File details
Details for the file solidaritytechtools-0.1.0-py3-none-any.whl.
File metadata
- Download URL: solidaritytechtools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dacfcd96d4af1765259cb6e9196fec14eb807c37c05c21e8a27dc94beb2eb53b
|
|
| MD5 |
f8f5f7cec8d247db2774513e7e481bce
|
|
| BLAKE2b-256 |
26d7d32ceeafe08f4fa6e62bc24d1c9783570dac558bd2dfef47ff2c176f5b26
|
Provenance
The following attestation bundles were made for solidaritytechtools-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on jackklika/solidaritytechtools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
solidaritytechtools-0.1.0-py3-none-any.whl -
Subject digest:
dacfcd96d4af1765259cb6e9196fec14eb807c37c05c21e8a27dc94beb2eb53b - Sigstore transparency entry: 844491713
- Sigstore integration time:
-
Permalink:
jackklika/solidaritytechtools@1c84b7f3f7a7ca33ba7e7608bb043961fc4e5c7d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/jackklika
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@1c84b7f3f7a7ca33ba7e7608bb043961fc4e5c7d -
Trigger Event:
push
-
Statement type: