{"id":13520335,"url":"https://github.com/valencian-digital/planter","last_synced_at":"2025-03-31T16:31:18.780Z","repository":{"id":38333294,"uuid":"410361463","full_name":"valencian-digital/planter","owner":"valencian-digital","description":"Blazingly fast data generation for MongoDB","archived":false,"fork":false,"pushed_at":"2022-06-06T19:59:36.000Z","size":77,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-08-02T05:23:15.508Z","etag":null,"topics":["data-generation","database","mongodb","rust","seeding"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valencian-digital.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-25T19:15:14.000Z","updated_at":"2022-01-12T17:26:24.000Z","dependencies_parsed_at":"2022-08-25T03:54:04.016Z","dependency_job_id":null,"html_url":"https://github.com/valencian-digital/planter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valencian-digital%2Fplanter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valencian-digital%2Fplanter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valencian-digital%2Fplanter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valencian-digital%2Fplanter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valencian-digital","download_url":"https://codeload.github.com/valencian-digital/planter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222670691,"owners_count":17020513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-generation","database","mongodb","rust","seeding"],"created_at":"2024-08-01T05:02:17.894Z","updated_at":"2024-11-02T03:31:23.042Z","avatar_url":"https://github.com/valencian-digital.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# Planter\nBlazingly fast and simple data generation \u0026 seeding for MongoDB\n\n\n## Installation\n\nUse the package manager [cargo](https://pip.pypa.io/en/stable/) to install planter.\nAdd the following to your Cargo.toml\n```toml\n[dependencies]\nplanter = {git = \"https://github.com/valencian-digital/planter\", branch = \"main\"}# from online repo```\n```\n## Usage\n\n```rust\nfn user_generator(_history: \u0026planter::GeneratedData) -\u003e bson::Document {\n    return doc! {\n        \"_id\": bson::Bson::ObjectId(bson::oid::ObjectId::new()),\n        \"name\": \"Jane Doe\"\n    };\n}\n\n...\n\nlet documents_per_collection = 1000;\nlet collections: Vec\u003c(String, planter::EntityGenerator)\u003e = vec![\n    (String::from(\"users\"), user_generator),\n];\n\nplanter::seed_data(\n    collections,\n    planter::Configurations::new(documents_per_collection, planter::SeedMode::Disk),\n);\n```\n\nThen to import that data into your running MongoDB database, execute the following command:\n```bash\nmongorestore --db=test data/\n```\nLook at the [mongorestore](https://docs.mongodb.com/database-tools/mongorestore/#std-label-mongorestore-examples) documentation in order to see all of options\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalencian-digital%2Fplanter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalencian-digital%2Fplanter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalencian-digital%2Fplanter/lists"}