Skip to main content

gitdb

python-gitdb is a small Python module that allows to use a git repository as key-value-store. The data can be serialized by different Serializers.

Attention! The integration of a remote repository is rudimental, i.e., push and pull currently only works via soft resets.

Serializers

There are several serializers provided to store the data:

  • JsonSerializer (included without further modules)

  • BJsonSerializer

  • YamlSerializer

  • MsgPackSerializer

Depending on the selected serializer, the corresponding module must be installed.

Setup

poetry install python-gitdb

Usage

from gitdb import GitDb
from gitdb.serializers.jsonserializer import JsonSerializer

# git repository that is used as database
REPO = "/your/path/to/the/repository"

# prepare the git repository database
gitdb = GitDb(REPO, serializer=JsonSerializer)

# add two entries
gitdb.set("key_a", "test")
gitdb.set("key_b", {"a": 1, "b": 2})

# load two entries
print(gitdb.get("key_a"))
print(gitdb.get("key_b"))

Metadata

Release files for python-gitdb 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-gitdb 0.0.4
File Size Uploaded Provenance
python_gitdb-0.0.4.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gitdb 0.0.4
File Interpreter ABI Platform
python_gitdb-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.0 kB

Release files / python_gitdb-0.0.4.tar.gz

Download URL python_gitdb-0.0.4.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
11b346d638533018239ef94a8bc1b674e4a17865eba5a44dc716c5e450c85222
BLAKE2b-256 checksum
How to use checksums
58430512eb051702c1e04b7543814499f42772efa3efc9819029106c06946974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

Release files / python_gitdb-0.0.4-py3-none-any.whl

Download URL python_gitdb-0.0.4-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db2fc4b028abb325864cea1dd1971dfbfc3a0513f5d308df119d5dbd9a11f956
BLAKE2b-256 checksum
How to use checksums
568cf41c18e522c780d118df2ea806f50d8c747fa4f6c17fcabbe34ac1038633
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

Security for python-gitdb 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page