Name | mongomasker_cli JSON |
Version |
0.5.0
JSON |
| download |
home_page | None |
Summary | MongoMasker is a tool designed to anonymize specified fields in a MongoDB collection. It uses the `faker` library to generate realistic fake data, processes documents in batches for improved performance, and leverages asynchronous processing with `motor` for efficiency. |
upload_time | 2024-10-21 14:54:02 |
maintainer | None |
docs_url | None |
author | Zeeshan Khan |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MongoMasker
MongoMasker is a tool designed to anonymize specified fields in a MongoDB collection. It uses the `faker` library to generate realistic fake data, processes documents in batches for improved performance, and leverages asynchronous processing with `motor` for efficiency.
## Features
- Anonymizes specified fields with realistic fake data
- Supports nested fields and fields within objects in arrays
- Processes documents in batches for better performance
- Uses asynchronous processing for efficiency
## Requirements
- Python 3.6+
- `motor` library
- `pymongo` library
- `faker` library
- `typer` library
## Installation
Install the required libraries using pip:
```bash
poetry install
```
## Usage
1. Create a JSON file specifying the fields to anonymize. For example, `fields_to_anonymize.json`:
```json
{
"field1": "name",
"nested.field": "email",
"array.field": "address",
"dateField": "date",
"location.zipcode": "zipcode",
"user.stateCode": "stateCode",
"user.lastname": "lastname",
"address.city": "city"
}
```
2. Run the script from the command line:
```bash
mongomasker \
"mongodb://your_username:your_password@your_host:your_port" \
source_database \
source_collection \
target_database \
target_collection \
fields_to_anonymize.json \
--batch-size 100
```
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "mongomasker_cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Zeeshan Khan",
"author_email": "zkhan1093@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/8e/ac/24998866552797a879b5c5260fca54fd97bf3cea072202a7a7198a71a136/mongomasker_cli-0.5.0.tar.gz",
"platform": null,
"description": "\n# MongoMasker\n\nMongoMasker is a tool designed to anonymize specified fields in a MongoDB collection. It uses the `faker` library to generate realistic fake data, processes documents in batches for improved performance, and leverages asynchronous processing with `motor` for efficiency.\n\n## Features\n\n- Anonymizes specified fields with realistic fake data\n- Supports nested fields and fields within objects in arrays\n- Processes documents in batches for better performance\n- Uses asynchronous processing for efficiency\n\n## Requirements\n\n- Python 3.6+\n- `motor` library\n- `pymongo` library\n- `faker` library\n- `typer` library\n\n## Installation\n\nInstall the required libraries using pip:\n\n```bash\npoetry install\n```\n\n\n## Usage\n\n1. Create a JSON file specifying the fields to anonymize. For example, `fields_to_anonymize.json`:\n\n```json\n{\n \"field1\": \"name\",\n \"nested.field\": \"email\",\n \"array.field\": \"address\",\n \"dateField\": \"date\",\n \"location.zipcode\": \"zipcode\",\n \"user.stateCode\": \"stateCode\",\n \"user.lastname\": \"lastname\",\n \"address.city\": \"city\"\n}\n```\n\n2. Run the script from the command line:\n\n```bash\nmongomasker \\\n \"mongodb://your_username:your_password@your_host:your_port\" \\\n source_database \\\n source_collection \\\n target_database \\\n target_collection \\\n fields_to_anonymize.json \\\n --batch-size 100\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "MongoMasker is a tool designed to anonymize specified fields in a MongoDB collection. It uses the `faker` library to generate realistic fake data, processes documents in batches for improved performance, and leverages asynchronous processing with `motor` for efficiency.",
"version": "0.5.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b9004c06a9c334b5dcdf4aee006b18380585fabeb25a470dd0c9c028335dfb59",
"md5": "39a2e346b9469b98a4faaacc4d86d786",
"sha256": "98468232d61bf596d853778fe9356ea6f8aa4c122e1e753c8e72043ff4bcd34a"
},
"downloads": -1,
"filename": "mongomasker_cli-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "39a2e346b9469b98a4faaacc4d86d786",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 3794,
"upload_time": "2024-10-21T14:54:00",
"upload_time_iso_8601": "2024-10-21T14:54:00.185972Z",
"url": "https://files.pythonhosted.org/packages/b9/00/4c06a9c334b5dcdf4aee006b18380585fabeb25a470dd0c9c028335dfb59/mongomasker_cli-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8eac24998866552797a879b5c5260fca54fd97bf3cea072202a7a7198a71a136",
"md5": "5baae35ecf6ba3125480d3388d160fad",
"sha256": "4f9c13f3255aea756bc3e0a80f59db67b6fa71329f60f7591ae58c53468866e7"
},
"downloads": -1,
"filename": "mongomasker_cli-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "5baae35ecf6ba3125480d3388d160fad",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 3150,
"upload_time": "2024-10-21T14:54:02",
"upload_time_iso_8601": "2024-10-21T14:54:02.097197Z",
"url": "https://files.pythonhosted.org/packages/8e/ac/24998866552797a879b5c5260fca54fd97bf3cea072202a7a7198a71a136/mongomasker_cli-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-21 14:54:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mongomasker_cli"
}