Comments (1)
Definitely!
You could try to write your own storage (see docs).
It's fairly simple; you only need four methods.
__init__
, read
, write
, and close
.
Since you want to use authentication, I assume adding a password to the __init__
function would be the easiest.
To actually encrypt the data, you can use something like cryptography.
You can use these docs to create a password.
- On init, check if a password and/or key file exist (if not, create them).
- Check the provided password (given through the
__init__
function). - If it's correct, finish initialization; otherwise, raise an error or something.
- On every read, we'll decrypt; on every write, we'll encrypt.
Decrypting and encrypting on every read and write, respectively, will have a certain performance penalty, of course.
You could also decrypt the file once on initialization and encrypt it during the close, but this will result in the file being readable on disk for as long as the program is active.
from tinydb.
Related Issues (20)
- Does tinyDB support multi-thread/process access ? HOT 2
- TinyDB 4.8.0 issue HOT 2
- -1073741571 (0xC00000FD) something interesting occured. HOT 2
- Are there any option to persist query caches? HOT 1
- Json decoder error when reading DB from multiple processes HOT 2
- Broken link in documentation.
- is there any way to speed up deletion HOT 1
- Document ID and existing unique value in the document HOT 1
- Search documents that do not have a specific key
- A simple implementation for update_multiple_by_id
- bug: MemoryStorage incorrectly keeps references to nested dicts
- json context manager
- How can we ensure uniqeness when inserting HOT 1
- Questions about Copilot + Open Source Software Hierarchy
- What specific scenarios can this database be used in? HOT 2
- LRUCache.set not update cache value when the key exists
- suggest renaming param for table.update()
- db.clear_cache() does not re-read new db.json file
- 3 Insert calls to table, only 2 go through HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinydb.