Name | nqlstore JSON |
Version |
0.1.6
JSON |
| download |
home_page | None |
Summary | NQLStore, a simple CRUD store python library for `any query launguage` (or in short `nql`). |
upload_time | 2025-02-19 20:02:46 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT License
Copyright (c) 2025 Martin Ahindura
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
database
model
orm
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# NQLStore
[](https://badge.fury.io/py/nqlstore) 
NQLStore, a simple CRUD store python library for `any query launguage` (or in short `nql`)
---
NQLStore provides an oversimplified API for the mundane things of _creating_, _reading_,
_updating_, and _deleting_ data models that are persisted to any `SQL-` or `NoSQL-` database.
In total, all we need are four methods and that is it.
Supported databases include:
- Relational databases like:
- SQLite
- PostgreSQL
- MySQL
- NoSQL databases like:
- Redis
- MongoDB
If you like our simple API, you can even easily extend it to
support your favourite database technology.
## Dependencies
- [Python +3.10](https://www.python.org/downloads/)
- [Pydantic +2.0](https://docs.pydantic.dev/latest/)
- [SQLModel _(_optional_)](https://sqlmodel.tiangolo.com/) - only required for relational databases
- [RedisOM (_optional_)](https://redis.io/docs/latest/integrate/redisom-for-python/) - only required for [redis](https://redis.io/)
- [Beanie (_optional_)](https://beanie-odm.dev/) - only required for [MongoDB](https://www.mongodb.com/)
## Examples
See the [`examples`](/examples) folder for some example applications.
Hopefully more examples will be added with time. Currently, we have the following:
- [todos](./examples/todos)
## Quick Start
### Install NQLStore from Pypi
Install NQLStore from pypi, with any of the options: `sql`, `mongo`, `redis`, `all`.
```shell
pip install "nqlstore[all]"
```
### Create Schemas
Create the basic structure of the data that will be saved in the store.
These schemas will later be used to create models that are specific to the underlying database
technology.
```python
# schemas.py
from nqlstore import Field, Relationship
from pydantic import BaseModel
class Library(BaseModel):
address: str = Field(index=True, full_text_search=True)
name: str = Field(index=True, full_text_search=True)
books: list["Book"] = Relationship(back_populates="library")
class Settings:
# this Settings class is optional. It is only used by Mongo models
# See https://beanie-odm.dev/tutorial/defining-a-document/
name = "libraries"
class Book(BaseModel):
title: str = Field(index=True)
library_id: int | None = Field(default=None, foreign_key="sqllibrary.id", disable_on_redis=True, disable_on_mongo=True)
library: Library | None = Relationship(back_populates="books", disable_on_redis=True, disable_on_mongo=True)
```
### Initialize your store and its models
Initialize the store and its models that is to host your models.
#### SQL
_Migrations are outside the scope of this package_
```python
# main.py
from nqlstore import SQLStore, SQLModel
from .schemas import Book, Library
# Define models specific to SQL.
SqlLibrary = SQLModel(
"SqlLibrary", Library, relationships={"books": list["SqlBook"]}
)
SqlBook = SQLModel("SqlBook", Book, relationships={"library": SqlLibrary | None})
async def main():
sql_store = SQLStore(uri="sqlite+aiosqlite:///database.db")
await sql_store.register([
SqlLibrary,
SqlBook,
])
```
#### Redis
**Take note that JsonModel, EmbeddedJsonModel require RedisJSON, while queries require RedisSearch to be loaded**
**You need to install [redis-stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) or load the modules manually**
```python
# main.py
from nqlstore import RedisStore, EmbeddedJsonModel, JsonModel
from .schemas import Book, Library
# Define models specific to redis.
RedisBook = EmbeddedJsonModel("RedisBook", Book)
RedisLibrary = JsonModel("RedisLibrary", Library, embedded_models={"books": list[RedisBook]})
async def main():
redis_store = RedisStore(uri="rediss://username:password@localhost:6379/0")
await redis_store.register([
RedisLibrary,
RedisBook,
])
```
#### Mongo
```python
# main.py
from nqlstore import MongoStore, MongoModel, EmbeddedMongoModel
from .schemas import Library, Book
# Define models specific to MongoDB.
MongoBook = EmbeddedMongoModel("MongoBook", Book)
MongoLibrary = MongoModel("MongoLibrary", Library, embedded_models={"books": list[MongoBook]})
async def main():
mongo_store = MongoStore(uri="mongodb://localhost:27017", database="testing")
await mongo_store.register([
MongoLibrary,
MongoBook,
])
```
### Use your models in your application
In the rest of your application use the four CRUD methods on the store to do CRUD operations.
Filtering follows the [MongoDb-style](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#find-documents-that-match-query-criteria)
> **Note**: For more complex queries, one can also pass in querying styles native to the type of the database,
> alongside the MongoBD-style querying. The two queries would be merged as `AND` queries.
>
> Or one can simply ignore the MongoDB-style querying and stick to the native querying.
>
> The available querying formats include:
>
> - SQL - [SQLModel-style](https://sqlmodel.tiangolo.com/tutorial/where/#where-and-expressions-instead-of-keyword-arguments)
> - Redis - [RedisOM-style](https://redis.io/docs/latest/integrate/redisom-for-python/#create-read-update-and-delete-data)
> - MongoDb - [MongoDB-style](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#find-documents-that-match-query-criteria)
#### Insert
Inserting new items in a store, call `store.insert()` method.
```python
new_libraries = await sql_store.insert(SqlLibrary, [{}, {}])
new_libraries = await mongo_store.insert(MongoLibrary, [{}, {}])
new_libraries = await redis_store.insert(RedisLibrary, [{}, {}])
```
#### Find
Finding items in a store, call the `store.find()` method.
The key-word arguments include:
- `skip (int)` - number of records to ignore at the top of the returned results; default is 0.
- `limit (int | None)` - maximum number of records to return; default is None.
The querying format is as described [above](#use-your-models-in-your-application)
```python
# MongoDB-style: works with any underlying database technology
libraries = await sql_store.find(
SqlLibrary, query={"name": {"$eq": "Hairora"}, "address" : {"$ne": "Buhimba"}}
)
# Native SQL-style: works only if underlying database is SQL database
libraries = await sql_store.find(
SqlLibrary, SqlLibrary.name == "Hairora", SqlLibrary.address != "Buhimba"
)
# Hybrid SQL-Mongo-style: works only if underlying database is SQL database
libraries = await sql_store.find(
SqlLibrary, SqlLibrary.name == "Hairora", query={"address" : {"$ne": "Buhimba"}}
)
# Native Redis-style: works only if underlying database is redis database
libraries = await redis_store.find(
RedisLibrary, (RedisLibrary.name == "Hairora") & (RedisLibrary.address != "Buhimba")
)
# Hybrid redis-mongo-style: works only if underlying database is redis database
libraries = await redis_store.find(
RedisLibrary, (RedisLibrary.name == "Hairora"), query={"address" : {"$ne": "Buhimba"}}
)
```
#### Update
Updating items in a store, call the `store.update()` method.
The method returns the newly updated records.
The `filters` follow the same style as that used when querying as shown [above](#read).
The `updates` objects are simply dictionaries of the new field values.
```python
# Mongo-style of filtering: works with any underlying database technology
libraries = await redis_store.update(
RedisLibrary,
query={"name": {"$eq": "Hairora"}, "address" : {"$ne": "Buhimba"}},
updates={"name": "Foo"},
)
# Native SQL-style filtering: works only if the underlying database is SQL
libraries = await sql_store.update(
SqlLibrary,
SqlLibrary.name == "Hairora", SqlLibrary.address != "Buhimba",
updates={"name": "Foo"},
)
# Hybrid SQL-mongo-style filtering: works only if the underlying database is SQL
libraries = await sql_store.update(
SqlLibrary,
SqlLibrary.name == "Hairora", query={"address" : {"$ne": "Buhimba"}},
updates={"name": "Foo"},
)
# Native redisOM-style filtering: works only if the underlying database is redis
libraries = await redis_store.update(
RedisLibrary,
(RedisLibrary.name == "Hairora") & (RedisLibrary.address != "Buhimba"),
updates={"name": "Foo"},
)
# Hybrid redis-mongo-style filtering: works only if the underlying database is redis
libraries = await redis_store.update(
RedisLibrary,
(RedisLibrary.name == "Hairora"),
query={"address" : {"$ne": "Buhimba"}},
updates={"name": "Foo"},
)
# MongoDB is special. It can also accept `updates` of the MongoDB-style update dicts
# See <https://www.mongodb.com/docs/manual/reference/operator/update/>.
# However, this has the disadvantage of making it difficult to swap out MongoDb
# with another underlying technology.
#
# It is thus recommended to stick to using `updates` that are simply
# dictionaries of the new field values.
#
# The MongoDB-style update dicts work only if the underlying database is mongodb
libraries = await mongo_store.update(
MongoLibrary,
{"name": "Hairora", "address": {"$ne": "Buhimba"}},
updates={"$set": {"name": "Foo"}}, # "$inc", "$addToSet" etc. can be accepted, but use with care
)
```
#### Delete
Deleting items in a store, call the `store.delete()` method.
The `filters` follow the same style as that used when reading as shown [above](#read).
```python
# Mongo-style of filtering: works with any underlying database technology
libraries = await mongo_store.delete(
MongoLibrary, query={"name": {"$eq": "Hairora"}, "address" : {"$ne": "Buhimba"}}
)
# Native SQL-style filtering: works only if the underlying database is SQL
libraries = await sql_store.delete(
SqlLibrary, SqlLibrary.name == "Hairora", SqlLibrary.address != "Buhimba"
)
# Hybrid SQL-mongo-style filtering: works only if the underlying database is SQL
libraries = await sql_store.delete(
SqlLibrary, SqlLibrary.name == "Hairora", query={"address" : {"$ne": "Buhimba"}}
)
# Native redisOM-style filtering: works only if the underlying database is redis
libraries = await redis_store.delete(
RedisLibrary, (RedisLibrary.name == "Hairora") & (RedisLibrary.address != "Buhimba")
)
# Hybrid redis-mongo-style filtering: works only if the underlying database is redis
libraries = await redis_store.delete(
RedisLibrary, (RedisLibrary.name == "Hairora"), query={"address" : {"$ne": "Buhimba"}}
)
```
## TODO
- [ ] Add documentation site
## Contributions
Contributions are welcome. The docs have to maintained, the code has to be made cleaner, more idiomatic and faster,
and there might be need for someone else to take over this repo in case I move on to other things. It happens!
When you are ready, look at the [CONTRIBUTIONS GUIDELINES](./CONTRIBUTING.md)
## License
Copyright (c) 2025 [Martin Ahindura](https://github.com/Tinitto)
Licensed under the [MIT License](./LICENSE)
## Gratitude
Thanks goes to the people in the [CREDITS.md](./CREDITS.md), for the efforts
they have put into this project.
But above all, glory be to God.
> "In that day you will ask in My name. I am not saying that I will ask the Father on your behalf.
> No, the Father himself loves you because you have loved Me and have believed that I came from God."
>
> -- John 16: 26-27
<a href="https://www.buymeacoffee.com/martinahinJ" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Raw data
{
"_id": null,
"home_page": null,
"name": "nqlstore",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "database, model, orm",
"author": null,
"author_email": "Martin Ahindura <sales@sopherapps.com>",
"download_url": "https://files.pythonhosted.org/packages/b9/ba/32ff683d5135bfe48f6606d7c6172f169282fb62cfa1a30c32a385ffa9d6/nqlstore-0.1.6.tar.gz",
"platform": null,
"description": "# NQLStore\n\n[](https://badge.fury.io/py/nqlstore) \n\nNQLStore, a simple CRUD store python library for `any query launguage` (or in short `nql`)\n\n---\n\nNQLStore provides an oversimplified API for the mundane things of _creating_, _reading_,\n_updating_, and _deleting_ data models that are persisted to any `SQL-` or `NoSQL-` database. \n\nIn total, all we need are four methods and that is it.\n\nSupported databases include:\n\n- Relational databases like:\n\n - SQLite\n - PostgreSQL\n - MySQL\n\n- NoSQL databases like:\n\n - Redis\n - MongoDB\n\nIf you like our simple API, you can even easily extend it to \nsupport your favourite database technology.\n\n## Dependencies\n\n- [Python +3.10](https://www.python.org/downloads/)\n- [Pydantic +2.0](https://docs.pydantic.dev/latest/)\n- [SQLModel _(_optional_)](https://sqlmodel.tiangolo.com/) - only required for relational databases\n- [RedisOM (_optional_)](https://redis.io/docs/latest/integrate/redisom-for-python/) - only required for [redis](https://redis.io/)\n- [Beanie (_optional_)](https://beanie-odm.dev/) - only required for [MongoDB](https://www.mongodb.com/)\n\n## Examples\n\nSee the [`examples`](/examples) folder for some example applications. \nHopefully more examples will be added with time. Currently, we have the following:\n\n- [todos](./examples/todos)\n\n## Quick Start\n\n### Install NQLStore from Pypi \n\nInstall NQLStore from pypi, with any of the options: `sql`, `mongo`, `redis`, `all`.\n\n```shell\npip install \"nqlstore[all]\"\n```\n\n### Create Schemas\n\nCreate the basic structure of the data that will be saved in the store. \nThese schemas will later be used to create models that are specific to the underlying database\ntechnology.\n\n```python\n# schemas.py\n\nfrom nqlstore import Field, Relationship\nfrom pydantic import BaseModel\n\n\nclass Library(BaseModel):\n address: str = Field(index=True, full_text_search=True)\n name: str = Field(index=True, full_text_search=True)\n books: list[\"Book\"] = Relationship(back_populates=\"library\")\n\n class Settings:\n # this Settings class is optional. It is only used by Mongo models\n # See https://beanie-odm.dev/tutorial/defining-a-document/\n name = \"libraries\"\n\n\nclass Book(BaseModel):\n title: str = Field(index=True)\n library_id: int | None = Field(default=None, foreign_key=\"sqllibrary.id\", disable_on_redis=True, disable_on_mongo=True)\n library: Library | None = Relationship(back_populates=\"books\", disable_on_redis=True, disable_on_mongo=True)\n```\n\n### Initialize your store and its models\n\nInitialize the store and its models that is to host your models.\n\n#### SQL\n\n_Migrations are outside the scope of this package_\n\n```python\n# main.py\n\nfrom nqlstore import SQLStore, SQLModel\nfrom .schemas import Book, Library\n\n\n# Define models specific to SQL.\nSqlLibrary = SQLModel(\n \"SqlLibrary\", Library, relationships={\"books\": list[\"SqlBook\"]}\n )\nSqlBook = SQLModel(\"SqlBook\", Book, relationships={\"library\": SqlLibrary | None})\n\n\n\nasync def main():\n sql_store = SQLStore(uri=\"sqlite+aiosqlite:///database.db\")\n await sql_store.register([\n SqlLibrary,\n SqlBook,\n ])\n```\n\n#### Redis\n\n**Take note that JsonModel, EmbeddedJsonModel require RedisJSON, while queries require RedisSearch to be loaded**\n**You need to install [redis-stack](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/) or load the modules manually**\n\n```python\n# main.py\n\nfrom nqlstore import RedisStore, EmbeddedJsonModel, JsonModel\nfrom .schemas import Book, Library\n\n# Define models specific to redis.\nRedisBook = EmbeddedJsonModel(\"RedisBook\", Book)\nRedisLibrary = JsonModel(\"RedisLibrary\", Library, embedded_models={\"books\": list[RedisBook]})\n\nasync def main():\n redis_store = RedisStore(uri=\"rediss://username:password@localhost:6379/0\")\n await redis_store.register([\n RedisLibrary,\n RedisBook,\n ])\n```\n\n#### Mongo\n\n```python\n# main.py\n\nfrom nqlstore import MongoStore, MongoModel, EmbeddedMongoModel\nfrom .schemas import Library, Book\n\n# Define models specific to MongoDB.\nMongoBook = EmbeddedMongoModel(\"MongoBook\", Book)\nMongoLibrary = MongoModel(\"MongoLibrary\", Library, embedded_models={\"books\": list[MongoBook]})\n\n\nasync def main():\n mongo_store = MongoStore(uri=\"mongodb://localhost:27017\", database=\"testing\")\n await mongo_store.register([\n MongoLibrary,\n MongoBook,\n ])\n\n```\n\n### Use your models in your application\n\nIn the rest of your application use the four CRUD methods on the store to do CRUD operations. \nFiltering follows the [MongoDb-style](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#find-documents-that-match-query-criteria)\n\n> **Note**: For more complex queries, one can also pass in querying styles native to the type of the database, \n> alongside the MongoBD-style querying. The two queries would be merged as `AND` queries. \n>\n> Or one can simply ignore the MongoDB-style querying and stick to the native querying. \n> \n> The available querying formats include:\n> \n> - SQL - [SQLModel-style](https://sqlmodel.tiangolo.com/tutorial/where/#where-and-expressions-instead-of-keyword-arguments)\n> - Redis - [RedisOM-style](https://redis.io/docs/latest/integrate/redisom-for-python/#create-read-update-and-delete-data)\n> - MongoDb - [MongoDB-style](https://www.mongodb.com/docs/manual/reference/method/db.collection.find/#find-documents-that-match-query-criteria)\n\n#### Insert\n\nInserting new items in a store, call `store.insert()` method.\n\n```python\nnew_libraries = await sql_store.insert(SqlLibrary, [{}, {}])\nnew_libraries = await mongo_store.insert(MongoLibrary, [{}, {}])\nnew_libraries = await redis_store.insert(RedisLibrary, [{}, {}])\n```\n\n#### Find\n\nFinding items in a store, call the `store.find()` method.\n\nThe key-word arguments include:\n\n- `skip (int)` - number of records to ignore at the top of the returned results; default is 0.\n- `limit (int | None)` - maximum number of records to return; default is None.\n\nThe querying format is as described [above](#use-your-models-in-your-application)\n\n```python\n# MongoDB-style: works with any underlying database technology\nlibraries = await sql_store.find(\n SqlLibrary, query={\"name\": {\"$eq\": \"Hairora\"}, \"address\" : {\"$ne\": \"Buhimba\"}}\n)\n\n\n# Native SQL-style: works only if underlying database is SQL database\nlibraries = await sql_store.find(\n SqlLibrary, SqlLibrary.name == \"Hairora\", SqlLibrary.address != \"Buhimba\"\n)\n\n\n# Hybrid SQL-Mongo-style: works only if underlying database is SQL database\nlibraries = await sql_store.find(\n SqlLibrary, SqlLibrary.name == \"Hairora\", query={\"address\" : {\"$ne\": \"Buhimba\"}}\n)\n\n\n# Native Redis-style: works only if underlying database is redis database\nlibraries = await redis_store.find(\n RedisLibrary, (RedisLibrary.name == \"Hairora\") & (RedisLibrary.address != \"Buhimba\")\n)\n\n\n# Hybrid redis-mongo-style: works only if underlying database is redis database\nlibraries = await redis_store.find(\n RedisLibrary, (RedisLibrary.name == \"Hairora\"), query={\"address\" : {\"$ne\": \"Buhimba\"}}\n)\n```\n\n#### Update\n\nUpdating items in a store, call the `store.update()` method.\n\nThe method returns the newly updated records. \nThe `filters` follow the same style as that used when querying as shown [above](#read). \n\nThe `updates` objects are simply dictionaries of the new field values.\n\n```python\n# Mongo-style of filtering: works with any underlying database technology\nlibraries = await redis_store.update(\n RedisLibrary, \n query={\"name\": {\"$eq\": \"Hairora\"}, \"address\" : {\"$ne\": \"Buhimba\"}},\n updates={\"name\": \"Foo\"},\n)\n\n\n# Native SQL-style filtering: works only if the underlying database is SQL\nlibraries = await sql_store.update(\n SqlLibrary, \n SqlLibrary.name == \"Hairora\", SqlLibrary.address != \"Buhimba\", \n updates={\"name\": \"Foo\"},\n)\n\n\n# Hybrid SQL-mongo-style filtering: works only if the underlying database is SQL\nlibraries = await sql_store.update(\n SqlLibrary, \n SqlLibrary.name == \"Hairora\", query={\"address\" : {\"$ne\": \"Buhimba\"}},\n updates={\"name\": \"Foo\"},\n)\n\n\n# Native redisOM-style filtering: works only if the underlying database is redis\nlibraries = await redis_store.update(\n RedisLibrary, \n (RedisLibrary.name == \"Hairora\") & (RedisLibrary.address != \"Buhimba\"), \n updates={\"name\": \"Foo\"},\n)\n\n\n# Hybrid redis-mongo-style filtering: works only if the underlying database is redis\nlibraries = await redis_store.update(\n RedisLibrary, \n (RedisLibrary.name == \"Hairora\"), \n query={\"address\" : {\"$ne\": \"Buhimba\"}},\n updates={\"name\": \"Foo\"},\n)\n\n\n# MongoDB is special. It can also accept `updates` of the MongoDB-style update dicts\n# See <https://www.mongodb.com/docs/manual/reference/operator/update/>.\n# However, this has the disadvantage of making it difficult to swap out MongoDb \n# with another underlying technology.\n#\n# It is thus recommended to stick to using `updates` that are simply \n# dictionaries of the new field values.\n# \n# The MongoDB-style update dicts work only if the underlying database is mongodb\nlibraries = await mongo_store.update(\n MongoLibrary,\n {\"name\": \"Hairora\", \"address\": {\"$ne\": \"Buhimba\"}},\n updates={\"$set\": {\"name\": \"Foo\"}}, # \"$inc\", \"$addToSet\" etc. can be accepted, but use with care\n)\n\n```\n\n\n#### Delete\n\nDeleting items in a store, call the `store.delete()` method.\n\nThe `filters` follow the same style as that used when reading as shown [above](#read).\n\n```python\n# Mongo-style of filtering: works with any underlying database technology\nlibraries = await mongo_store.delete(\n MongoLibrary, query={\"name\": {\"$eq\": \"Hairora\"}, \"address\" : {\"$ne\": \"Buhimba\"}}\n)\n\n\n# Native SQL-style filtering: works only if the underlying database is SQL\nlibraries = await sql_store.delete(\n SqlLibrary, SqlLibrary.name == \"Hairora\", SqlLibrary.address != \"Buhimba\"\n)\n\n\n# Hybrid SQL-mongo-style filtering: works only if the underlying database is SQL\nlibraries = await sql_store.delete(\n SqlLibrary, SqlLibrary.name == \"Hairora\", query={\"address\" : {\"$ne\": \"Buhimba\"}}\n)\n\n\n# Native redisOM-style filtering: works only if the underlying database is redis\nlibraries = await redis_store.delete(\n RedisLibrary, (RedisLibrary.name == \"Hairora\") & (RedisLibrary.address != \"Buhimba\")\n)\n\n\n# Hybrid redis-mongo-style filtering: works only if the underlying database is redis\nlibraries = await redis_store.delete(\n RedisLibrary, (RedisLibrary.name == \"Hairora\"), query={\"address\" : {\"$ne\": \"Buhimba\"}}\n)\n```\n\n## TODO\n\n- [ ] Add documentation site\n\n## Contributions\n\nContributions are welcome. The docs have to maintained, the code has to be made cleaner, more idiomatic and faster,\nand there might be need for someone else to take over this repo in case I move on to other things. It happens!\n\nWhen you are ready, look at the [CONTRIBUTIONS GUIDELINES](./CONTRIBUTING.md)\n\n## License\n\nCopyright (c) 2025 [Martin Ahindura](https://github.com/Tinitto) \nLicensed under the [MIT License](./LICENSE)\n\n## Gratitude\n\nThanks goes to the people in the [CREDITS.md](./CREDITS.md), for the efforts\nthey have put into this project. \n\nBut above all, glory be to God.\n\n> \"In that day you will ask in My name. I am not saying that I will ask the Father on your behalf.\n> No, the Father himself loves you because you have loved Me and have believed that I came from God.\"\n>\n> -- John 16: 26-27\n\n<a href=\"https://www.buymeacoffee.com/martinahinJ\" target=\"_blank\"><img src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" ></a>\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Martin Ahindura\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "NQLStore, a simple CRUD store python library for `any query launguage` (or in short `nql`).",
"version": "0.1.6",
"project_urls": {
"Changelog": "https://github.com/sopherapps/nqlstore/blob/master/CHANGELOG.md",
"Documentation": "https://github.com/sopherapps/nqlstore",
"Homepage": "https://github.com/sopherapps/nqlstore",
"Issues": "https://github.com/sopherapps/nqlstore/issues",
"Repository": "https://github.com/sopherapps/nqlstore"
},
"split_keywords": [
"database",
" model",
" orm"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9269b623d874d1083540a43e67eb982e70216ab9d06acde3e8d7a6310b427165",
"md5": "3708a2c2aa0fa5f7df2e2d5d85cfaadd",
"sha256": "0ba0ba485388c394efdcb6b59c8190c4265404881e2d47d5c7a1cf4776b601c3"
},
"downloads": -1,
"filename": "nqlstore-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3708a2c2aa0fa5f7df2e2d5d85cfaadd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 28068,
"upload_time": "2025-02-19T20:02:45",
"upload_time_iso_8601": "2025-02-19T20:02:45.112170Z",
"url": "https://files.pythonhosted.org/packages/92/69/b623d874d1083540a43e67eb982e70216ab9d06acde3e8d7a6310b427165/nqlstore-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b9ba32ff683d5135bfe48f6606d7c6172f169282fb62cfa1a30c32a385ffa9d6",
"md5": "f44493f10c0513364f2b59132d535306",
"sha256": "9cc20464af2b6853853c8a63337c827bc928ba5f7610aa8a773112f2dbce2bb6"
},
"downloads": -1,
"filename": "nqlstore-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "f44493f10c0513364f2b59132d535306",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 46757,
"upload_time": "2025-02-19T20:02:46",
"upload_time_iso_8601": "2025-02-19T20:02:46.975835Z",
"url": "https://files.pythonhosted.org/packages/b9/ba/32ff683d5135bfe48f6606d7c6172f169282fb62cfa1a30c32a385ffa9d6/nqlstore-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-19 20:02:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sopherapps",
"github_project": "nqlstore",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nqlstore"
}