Skip to main content

环境准备

安装所需的库

pip install happy-python pymongo

更改配置文件

cd mongo-py
cp conf/config.ini.sample conf/config.ini
cp conf/log.ini.sample conf/log.ini

在config.ini中填写mongodb的ip和port

使用方法

1.使用文件上传,file.js中为json格式的内容

python main.py -i file.js

2.查询匹配{'name': 'Jordan'}的document

python main.py -q "{'name': 'Jordan'}"

3.将匹配{'name': 'Jordan'}的collection更改name为Mike

python main.py -u "{'name': 'Jordan'}" "{'name':'Mike'}"

4.删除匹配{'name':'Mike'}的所有document

python main.py -d "{'name':'Mike'}"

Metadata

Release files for czh-mongo-py 0.0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for czh-mongo-py 0.0.1.0
File Size Uploaded
czh_mongo_py-0.0.1.0.tar.gz 2.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for czh-mongo-py 0.0.1.0
File Interpreter ABI Platform
czh_mongo_py-0.0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / czh_mongo_py-0.0.1.0.tar.gz

Download URL czh_mongo_py-0.0.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
db8f8e2f770dddb91c1613bf22cd2ba2f23fad6c31732ea288e6799315c2b280
BLAKE2b-256 checksum
How to use checksums
8aa6932355c0e3815dd2594dfb78fedaec2832db11e8c7d1e8bb6fdc390d3371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / czh_mongo_py-0.0.1.0-py3-none-any.whl

Download URL czh_mongo_py-0.0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1eb85c8d491e233d41187862fb048a0932b05d452a9364ceb866a4cbcf172df0
BLAKE2b-256 checksum
How to use checksums
9f0b21d88b7abced84e903250cd7162be95d1cd676c4912156f26fd8fd6dd4ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page