{ "info": { "author": "Oleksandr Shepetko", "author_email": "a@shepetko.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Database", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# QuBu\n\nQuBu is a simple database query builder for Python.\n\n\n## Build status\n\n\n\n\n\n## Features\n\nCurrently supported only some of MongoDB's main operators, such as:\n\n* Logical query operators:\n[$and](https://docs.mongodb.com/manual/reference/operator/query/and/), \n[$or](https://docs.mongodb.com/manual/reference/operator/query/or/),\n[$nor](https://docs.mongodb.com/manual/reference/operator/query/nor/),\n[$not](https://docs.mongodb.com/manual/reference/operator/query/not/)\n* Comparison query operators: \n[$eq](https://docs.mongodb.com/manual/reference/operator/query/eq/),\n[$gt](https://docs.mongodb.com/manual/reference/operator/query/gt/),\n[$gte](https://docs.mongodb.com/manual/reference/operator/query/gte/),\n[$in](https://docs.mongodb.com/manual/reference/operator/query/in/),\n[$lt](https://docs.mongodb.com/manual/reference/operator/query/lt/),\n[$lte](https://docs.mongodb.com/manual/reference/operator/query/lte/),\n[$ne](https://docs.mongodb.com/manual/reference/operator/query/ne/),\n[$nin](https://docs.mongodb.com/manual/reference/operator/query/nin/)\n* Evaluation query operators:\n[$text](https://docs.mongodb.com/manual/reference/operator/query/text/),\n[$regex](https://docs.mongodb.com/manual/reference/operator/query/regex/)\n* Geospatial query operators:\n[$near](https://docs.mongodb.com/manual/reference/operator/query/near/),\n[$nearSphere](https://docs.mongodb.com/manual/reference/operator/query/nearSphere/)\n\n\n## Requirements\n\n- [Python](https://python.org)>=3.6\n- [DicMer](https://github.com/ashep/dicmer)\n\n\n## Installation\n\n```bash\npip install qubu\n```\n\n## Usage\n\nFollowing Python code:\n\n```python\nfrom qubu import And, Or, Not, Eq, Ne, Gt\n\ne = Or(\n And(\n Eq('foo', 'bar'), \n Ne('bar', 'baz')\n ),\n Not(Gt('salary', 1500)),\n Eq('allowed', True),\n)\n\ne.compile()\n```\n\nwill give following object:\n\n```python\n{'$or': [\n {'$and': [\n {'foo': {'$eq': 'bar'}},\n {'bar': {'$ne': 'baz'}}\n ]}, \n {'salary': {'$not': {'$gt': 1500}}}, \n {'allowed': {'$eq': True}}\n]}\n``` \n\n\n## Documentation\n\nWork in progress.\n\n\n## Testing\n\n```bash\npython setup.py test\n```\n\n\n## Contributing\n\nIf you want to contribute to a project and make it better, your help is very \nwelcome. Contributing is also a great way to learn more about social coding on \nGithub, new technologies and and their ecosystems and how to make constructive, \nhelpful bug reports, feature requests and the noblest of all contributions: \na good, clean pull request.\n\n- Create a personal fork of the project on Github.\n- Clone the fork on your local machine. Your remote repo on Github is called \n `origin`.\n- Add the original repository as a remote called `upstream`.\n- If you created your fork a while ago be sure to pull upstream changes into \n your local repository.\n- Create a new branch to work on. Branch from `develop` if it exists, else from \n `master`.\n- Implement/fix your feature, comment your code.\n- Follow the code style of the project, including indentation.\n- If the project has tests run them.\n- Write or adapt tests as needed.\n- Add or change the documentation as needed.\n- Squash your commits into a single commit with git's interactive rebase. Create \n a new branch if necessary.\n- Push your branch to your fork on Github, the remote `origin`.\n- From your fork open a pull request in the correct branch. Target the project's \n `develop` branch if there is one, else go for `master`.\n- If the maintainer requests further changes just push them to your branch. \n- Once the pull request is approved and merged you can pull the changes from \n `upstream` to your local repo and delete your extra branch(es).\n\nAnd last but not least: Always write your commit messages in the present tense. \nYour commit message should describe what the commit, when applied, does to the \ncode \u2013 not what you did to the code.\n\n\n## Roadmap\n\n* Write documentation.\n* SQL expressions support.\n\n\n## Support\n\nIf you have any issues or enhancement proposals feel free to report them via \nproject's [Issue Tracker](https://github.com/ashep/qubu/issues). \n\n\n## Authors\n\n* [Oleksandr Shepetko](https://shepetko.com) -- initial work.\n\n\n## Credits\n\nNone\n\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE.md](LICENSE.md) \nfile for details.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/ashep/qubu/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ashep/qubu", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "qubu", "package_url": "https://pypi.org/project/qubu/", "platform": "", "project_url": "https://pypi.org/project/qubu/", "project_urls": { "Download": "https://github.com/ashep/qubu/archive/master.zip", "Homepage": "https://github.com/ashep/qubu" }, "release_url": "https://pypi.org/project/qubu/0.1/", "requires_dist": [ "dicmer" ], "requires_python": "", "summary": "A Simple Database Query Builder", "version": "0.1" }, "last_serial": 5691363, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "480fa36b9973086ea1170bdbc3980f98", "sha256": "64802932adf149804d10077b7cc3199bb1d8376de3d70f6b0784c9642e528610" }, "downloads": -1, "filename": "qubu-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "480fa36b9973086ea1170bdbc3980f98", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11986, "upload_time": "2019-08-17T10:26:09", "url": "https://files.pythonhosted.org/packages/1d/2d/07ec4b8a8a1ea794ef8b9d0e36a0497ba0125f8b3fdad1a1f1f3986fc970/qubu-0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "480fa36b9973086ea1170bdbc3980f98", "sha256": "64802932adf149804d10077b7cc3199bb1d8376de3d70f6b0784c9642e528610" }, "downloads": -1, "filename": "qubu-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "480fa36b9973086ea1170bdbc3980f98", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11986, "upload_time": "2019-08-17T10:26:09", "url": "https://files.pythonhosted.org/packages/1d/2d/07ec4b8a8a1ea794ef8b9d0e36a0497ba0125f8b3fdad1a1f1f3986fc970/qubu-0.1-py3-none-any.whl" } ] }