Mongo and redis cli
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dbcli_mongo_redis-0.3.7.tar.gz
.
File metadata
- Download URL: dbcli_mongo_redis-0.3.7.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1f4af5d5a57fef9f9f85e9f89006e8484851339bca7ea926b759c0bd5ecb3db |
|
MD5 | 031445b00493d6778773248781c9a104 |
|
BLAKE2b-256 | ef19d90c0388b29faf9f9cfb194c326955ed02a47a181c28203ef8462e368353 |
File details
Details for the file dbcli_mongo_redis-0.3.7-py3-none-any.whl
.
File metadata
- Download URL: dbcli_mongo_redis-0.3.7-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 378b15f376770eaeae2dcc921cc8de68d4784f302e4774f40925d901f64767e4 |
|
MD5 | 72102014b383cd01b79098bf6f401f6a |
|
BLAKE2b-256 | e78137d74c9b12dd36cd3e05afc65628bd8d0f3c5c372b602c3fc92fa3cf357d |