https://github.com/ayaanhossain/sharedb
An on-disk pythonic embedded key-value store for compressed data storage and distributed data analysis
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Keywords
Repository
An on-disk pythonic embedded key-value store for compressed data storage and distributed data analysis
Basic Info
Statistics
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
ShareDB in Action • Installation • License • Contributing • Acknowledgements • API
ShareDB is a lightweight, persistent key-value store with a dictionary-like interface built on top of LMDB. It is intended to replace a python dictionary when
- the key-value information needs to persist locally for later reuse,
- the data needs to be shared across multiple processes with minimal overhead, and
- the keys and values can be (de)serialized via msgpack or pickle.
A ShareDB instance may be opened simultaneously in children, for reading in parallel, as long as a single process writes to the instance. Parallel writes made across processes are not safe; they are not guaranteed to be written, and may corrupt instance. ShareDB is primarily developed and tested using Linux and is compatible with both Python 2.7 and Python 3.6 and above.
ShareDB in Action
```python
from ShareDB import ShareDB # Easy import print(ShareDB.version) # Check version 1.1.4 myDB = ShareDB(path='./test.ShareDB') # Store ShareDB locally myDB['Name'] = ['Ayaan Hossain'] # Insert information myDB.get(key='Name') # Retrieve values ['Ayaan Hossain']
Accelerated batch insertion/update via a single transaction
len(myDB.multiset(kviter=zip(range(0, 10), range(10, 20))).sync()) 11 7 in myDB # Membership queries work True myDB['non-existent key'] # KeyError on invalid get as expected Traceback (most recent call last): ... KeyError: "key=non-existent key of
is absent" myDB.pop(7) # Pop a key just like a dictionary 17 list(myDB.multipopitem(num items=5)) # Or, pop as many items as you need [(0, 10), (1, 11), (2, 12), (3, 13), (4, 14)] myDB.remove(5).remove(6).length() # Chain removal of several keys 2 myDB.clear().length() # Or, clear entire ShareDB 0 myDB.drop() # Close/delete when you're done True ``ShareDBmethods either return data/result up on appropriate query, or aselfis returned to facilitate method chaining. Terminal methods.close()and.drop()` return a boolean indicating success.
Please see the /examples/ directory for full examples of ShareDB usage. Please see the API.md file for API details.
Installation
One-shot installation/upgrade of ShareDB from PyPI.
bash
$ pip install --upgrade ShareDB
Alternatively, clone ShareDB from GitHub,
bash
$ git clone https://github.com/ayaanhossain/ShareDB
navigate into repo, and install via pip.
bash
$ cd ShareDB
$ pip install .
You can test ShareDB with pytest inside the /tests/ directory.
bash
$ cd tests
$ pytest
Uninstallation of ShareDB is easy with pip.
bash
$ pip uninstall ShareDB
License
ShareDB (c) 2019-2024 Ayaan Hossain.
ShareDB is an open-source software under MIT License.
See LICENSE file for more details.
Contributing
Please discuss any issues/bugs you're facing, or any changes/features you have in mind by opening an issue, following the Contributor Covenant. See COC.md file for details. Please provide detailed information, and code snippets to facilitate debugging.
To contribute to ShareDB, please clone this repository, commit your code on a separate new branch, and submit a pull request. Please annotate and describe all new and modified code with detailed comments and new unit tests as applicable. Please ensure that modified builds pass existing unit tests before sending pull-requests. For versioning, we use SemVer.
Acknowledgements
ShareDB is maintained by:
- Ayaan Hossain | github.com/ayaanhossain | @bioalgorithmist
ShareDB was originally written to meet data analysis needs in Prof. Howard Salis' Lab at Penn State University.
API
ShareDB API details can be found in the API.md file.
Owner
- Name: Ayaan Hossain
- Login: ayaanhossain
- Kind: user
- Location: Boston, MA
- Company: Tessera Therapeutics
- Website: linkedin.com/in/ayaan-hossain
- Twitter: bioalgorithmist
- Repositories: 6
- Profile: https://github.com/ayaanhossain
Computational Scientist working on Gene Editing.
GitHub Events
Total
- Watch event: 1
- Push event: 9
Last Year
- Watch event: 1
- Push event: 9
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 195
- Total Committers: 3
- Avg Commits per committer: 65.0
- Development Distribution Score (DDS): 0.179
Top Committers
| Name | Commits | |
|---|---|---|
| Ayaan Hossain | a****7@g****m | 160 |
| Ayaan Hossain | a****n@u****m | 33 |
| Ayaan Hossain | a****n@p****n | 2 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 147 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 4
- Total maintainers: 1
pypi.org: sharedb
An on-disk pythonic embedded key-value store for compressed data storage and distributed data analysis.
- Homepage: https://github.com/ayaanhossain/ShareDB
- Documentation: https://sharedb.readthedocs.io/
- License: MIT License
-
Latest release: 1.1.4
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- configparser >=4.0.2
- lmdb >=0.98
- msgpack >=0.6.2
- pytest-cov >=2.8.1
- configparser >=4.0.2
- lmdb >=0.98
- msgpack >=0.6.2
- pytest-cov >=2.8.1
- actions/checkout v1 composite
- actions/setup-python v1 composite
- codecov/codecov-action v1 composite