Utilities to encrypt files/directories with utilitz and exchange them through GitHub repositories.
Project description
gitstore
gitstore is a focused Python package for one goal:
- upload encrypted files/folders to a GitHub-backed repo
- restore them later by logical name from GitHub raw URLs
Installation
pip install gitstore
Dependency on utilitz
This project depends on:
utilitz[crypto]requests
Project Structure
gitstore/
src/gitstore/
__init__.py
client.py
config.py
crypto_ops.py
github_ops.py
pyproject.toml
README.md
Core API
from gitstore import GitStoreUploader, GitStoreDownloader
Upload
from gitstore import GitStoreUploader
uploader = GitStoreUploader(
repo_path="C:/repos/my-publish-repo", # required
security_level="high", # default
)
record = uploader.store(
source_path="C:/data/documento.pdf", # file or directory
name="documento_ventas_q2", # logical name only
replace_existing=True, # default: replace and purge previous history
commit_message=None, # default: automatic message
)
print(record)
Download
from gitstore import GitStoreDownloader
downloader = GitStoreDownloader(
raw_base_url="https://raw.githubusercontent.com/USER/REPO/main",
)
output_path = downloader.restore(
name="documento_ventas_q2",
output_path="C:/restore/documento.pdf",
overwrite=True,
)
print(output_path)
Destroy
from gitstore import GitStoreUploader
uploader = GitStoreUploader(repo_path="C:/repos/my-publish-repo")
uploader.destroy(name="documento_ventas_q2")
destroy(...) removes the current artifact and rewrites Git history for that artifact path.
Password Source
Both classes auto-detect password from:
GITSTORE_PASSWORD
If password is not passed, the environment variable is used.
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 gitstore-0.1.2.tar.gz.
File metadata
- Download URL: gitstore-0.1.2.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af6fd80c33fdca3665c78a51df840ab4c9f589736cb2addf931b8ec88dea5c6
|
|
| MD5 |
8db00dee9064446b134fc4000efd61f5
|
|
| BLAKE2b-256 |
e277ab6e4fd2f604d3434b36dd9f31db38bf6c80d5388657eae111f29da8eb1b
|
File details
Details for the file gitstore-0.1.2-py3-none-any.whl.
File metadata
- Download URL: gitstore-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e1a79fdfca97406099005077fced0d7aedad36091af9d7540c942a07a8f325f
|
|
| MD5 |
c7f2226261b3d73c869f4ef3986a8bd8
|
|
| BLAKE2b-256 |
f9c9ab20bfe0debbd8e6690a4314f9f23a2e19ef84d4111111847f5232657f92
|