tmjlite (Python)
Driver Python do TMJLite — banco de dados SQL embarcado, em um único
arquivo .tmjp, com branches de dados git-native. O motor nativo (Rust)
já vem dentro do wheel: nada para instalar além do pip.
pip install tmjlite
Plataformas: macOS (Apple Silicon), Linux x86-64, Windows x86-64 · Python ≥ 3.8.
import tmjlite
db = tmjlite.connect("app.tmjp")
db.execute("CREATE TABLE users (id PK, name TEXT, age INT);")
db.execute("INSERT INTO users (name, age) VALUES ('Alice', 30);")
for row in db.query("SELECT name, age FROM users WHERE age > 18;"):
print(row["name"], row["age"])
with db.transaction():
db.execute("INSERT INTO users (name, age) VALUES ('Bob', 25);")
db.close()
Branches — trabalhe numa cópia lógica e faça merge no arquivo principal, enquanto a aplicação continua enxergando o banco intocado:
b = tmjlite.open_branch("app.tmjp", "importacao")
b.execute("INSERT INTO users (name, age) VALUES ('Carol', 41);")
b.seal("primeira leva", author="thiago") # commit na branch
applied = b.commit() # merge no app.tmjp
print(f"{applied} linha(s) aplicadas")
Vários processos ao mesmo tempo? tmjlite.connect_shadow(path) dá a cada
worker uma sessão própria; commit() mergeia por chave primária.
Lotes e upsert (0.2.9+): prepared statements com ?, INSERT … ON CONFLICT
e transação na conexão compartilhada — um commit só:
db = tmjlite.connect_shared("app.tmjp")
st = db.prepare("INSERT INTO rs (ns, k, samples) VALUES (?, ?, ?) "
"ON CONFLICT (ns, k) DO UPDATE SET samples = excluded.samples;")
with db.transaction():
for it in lote:
st.execute([it.ns, it.k, it.samples])
- Manual: https://tmjlite.com.br/manual.html
- Branches e concorrência (guia + FAQ): https://tmjlite.com.br/branches.html
- Exemplo completo (sistema de cadastro): https://tmjlite.com.br/examples.html
- Changelog: https://github.com/TMJacometti/TMJPlatform/blob/main/CHANGELOG.md
Licença MIT · TMJ Sistemas de Informação.
Metadata
Release files for tmjlite 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tmjlite-0.2.9-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for tmjlite-0.2.9-py3-none-win_amd64.whl |
| tmjlite-0.2.9-py3-none-manylinux_2_34_x86_64.whl | Python 3 | none | Linux glibc 2.34+ x86-64 | Details for tmjlite-0.2.9-py3-none-manylinux_2_34_x86_64.whl |
| tmjlite-0.2.9-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details for tmjlite-0.2.9-py3-none-macosx_11_0_arm64.whl |
Total release size: 2.5 MB
Release files / tmjlite-0.2.9-py3-none-win_amd64.whl
| Download URL | tmjlite-0.2.9-py3-none-win_amd64.whl |
|---|---|
| Size | 865.0 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
faed319c337057a5e899bbb25083bc231c42d589a438a465caa202be82118fb3
|
|
BLAKE2b-256 checksum How to use checksums |
401fabe9b18822fb4c9780265d3dbe26a436cb25c1091acc5a3b2e84427325ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / tmjlite-0.2.9-py3-none-manylinux_2_34_x86_64.whl
| Download URL | tmjlite-0.2.9-py3-none-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 909.7 kB |
| Tags | Linux glibc 2.34+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
6a89de13caea89c57d76b25bf2d2c70dc699799a0c8f5f0c82c82c2c3ca69a08
|
|
BLAKE2b-256 checksum How to use checksums |
c59a8ae1c0ad7d470fabb202fc19fba381b35580f553714e391d437e1e84c843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logRelease files / tmjlite-0.2.9-py3-none-macosx_11_0_arm64.whl
| Download URL | tmjlite-0.2.9-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 773.8 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7017fd7a3ad8d2baff057f02e73f2c0d9188a33e93b76f442ee2d3b730cf09ef
|
|
BLAKE2b-256 checksum How to use checksums |
57ce572c37b7d27dfbf87022796557eeb9fb93fccf0eb81cc50f30586ce2f8f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logSecurity for tmjlite 0.2.9
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.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for tmjlite-0.2.9-py3-none-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.