No project description provided
Project description
Testing
CouchDB
http://localhost:5984/_utils/#
- user: admin
- passwd: pytest
Initialization
Automatic initialization from environment
init_backend()
Manual initialization
Example for MongoDB with alias.
If missing, the default for alias is "default"
MongoDbBackend(alias="people")
client = Backend.client(alias="people")
Pagination
Usage with routers
@router.get("/people")
@pagination()
def people_get():
return Backend.client().get_instances(PeopleModel)
Custom usage in code
pagination_params = PaginationParameterModel
with pagination_provider(pagination_params) as p:
Backend.client().get_instances(PeopleModel)
pagination_params = PaginationParameterModel
with pagination_provider(pagination_params) as p:
Backend.client().get_instances(PeopleModel)
pagination_params = PaginationParameterModel
with pagination_parameter_provider(pagination_params):
objs, max_results = Backend.client().pagination_aggregate(agg)
return pagination_result((objs, max_results))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantic_db_backend-3.4.0.tar.gz.
File metadata
- Download URL: pydantic_db_backend-3.4.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5d269d0c53260916ae7a0891b50d6e67276422fd7a28fdda91a247266fae32d
|
|
| MD5 |
83ec5aac913c9a176e54ebec9b98d01d
|
|
| BLAKE2b-256 |
d65e19dcd6f90205299e95dee6fc1ba7f49d1e0c240120315e4cc33403466f77
|
File details
Details for the file pydantic_db_backend-3.4.0-py3-none-any.whl.
File metadata
- Download URL: pydantic_db_backend-3.4.0-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.2 CPython/3.12.3 Linux/6.8.0-49-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e37667f76d70cd9c0ddff77c02ca4800c0fee9e6f0faa2c7d84f710d722cb62
|
|
| MD5 |
e148094cd499e1950c2cb15fb3c9a390
|
|
| BLAKE2b-256 |
a33a12ac2521d2233f1a84066f266088aa8e9f5e800c05c31c7ddb593e1803f5
|