dbcli
dbcli provides lightweight utilities set for basic CRUD operations for MongoDB and Redis.
With mcli You can access mongo documents for create and edit operations using your favourite text editor. It validates document and performs add and update operations.
rcli provides similar interface for Redis DB. You are able to edit strings(bytes), lists and hashs with json-like syntax in your text editor.
$EDITOR is used for bash. For Windows OS notepad or other windows editor.
DataBase cli utilities
- mcli - Mongo client based on pymongo
- rcli - Redis client based on pyredis
Installation
pip install dbcli-mongo-redis
mcli usage examples
mcli list-dbs
mcli list-cols -d books
mcli -d books -c authors list-docs
mcli -d books -c authors list-docs -f '{"Language":"Chinese"}'
mcli -d aws -c images show-doc -i ami-eede2314
mcli --database aws --collection images show-doc -i ami-eede2314
mcli --database aws --collection images show-doc --document-id ami-eede2314
mcli -d gcloud -c elements show-doc -o 5ef869cf316dd267c64be59c
mcli -d gcloud -c elements show-doc --document-object-id 5ef869cf316dd267c64be59c
mcli -d devops -c newcol edit-doc -o 5ef865fceb8e7562e8eaf9f6
mcli -d devops -c newcol edit-doc -i object-234
mcli -d devops -c newcol del-doc -i object-234
mcli -d devops -c newcol del-doc -o 5ef865fceb8e7562e8eaf9f6
rcli usage examples
rcli db-count
rcli list-keys
rcli list-keys -p image
rcli show-db
rcli show-db -k image_325
rcli show-db -p image_
rcli add-data
rcli add-key
rcli add-key -t hash
rcli edit-doc -k image_325
rcli del-doc -k image_214
rcli to-set -k some_list
rcli to-zset -k some_hash
Inspired by dbcli.
Limitations
Should avoid using in production and for huge amount of data. Since it's interactive tool it shouldn't be used for automatic updates of multiple docs.
License & Authors
- Authors: Rasul Osmanov, Artur Krasnykh
Copyright (c) 2020, Rasul Osmanov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
TODO
- AWS DynamoDB client
- Google Cloud DataStore client
Metadata
Release files for dbcli-mongo-redis 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dbcli_mongo_redis-0.3.7.tar.gz | 8.6 kB | Without provenance | Details for dbcli_mongo_redis-0.3.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dbcli_mongo_redis-0.3.7-py3-none-any.whl | Python 3 | none | any | Details for dbcli_mongo_redis-0.3.7-py3-none-any.whl |
Total release size: 17.1 kB
Release files / dbcli_mongo_redis-0.3.7.tar.gz
| Download URL | dbcli_mongo_redis-0.3.7.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a1f4af5d5a57fef9f9f85e9f89006e8484851339bca7ea926b759c0bd5ecb3db
|
|
BLAKE2b-256 checksum How to use checksums |
ef19d90c0388b29faf9f9cfb194c326955ed02a47a181c28203ef8462e368353
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10
|
Release files / dbcli_mongo_redis-0.3.7-py3-none-any.whl
| Download URL | dbcli_mongo_redis-0.3.7-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
378b15f376770eaeae2dcc921cc8de68d4784f302e4774f40925d901f64767e4
|
|
BLAKE2b-256 checksum How to use checksums |
e78137d74c9b12dd36cd3e05afc65628bd8d0f3c5c372b602c3fc92fa3cf357d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10
|
Security for dbcli-mongo-redis 0.3.7
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.