easyeasy.client
How to use
Install
pip install easyeasy
Initialize
from easyeasy.client import Client
client = Client("bc420813-17d9-47fa-9d29-8bd6a1207f8a")
Examples
class Cat:
def __init__(self):
self.id = None
self.name = None
self.interests = []
self.age = None
cat = Cat()
cat.name = "Sam"
cat.age = 1.5
cat.interests = ["play", "eat", "discover"]
# add object. entity name will be inferred from class name
id = client.add(cat)
# or specify entity name explicitly
id = client.add(cat, "cat")
# get one object by id. Specify entity type. Entity name will be inferred
cat = client.get_one(id, Cat)
# or specify entity name explicitly
cat = client.get_one(id, Cat, "cat")
# at least one should be specified(entity_class or entity_name). In case entity_class not specified, dict object will be returned
# update object
cat.age = 2.0
cat.interests = ["eat", "sleep", "play"]
# object must have id property to distinguish which object is being updated. entity_name can be specified explicitly
client.update(cat)
# get all objects. entity_name can be specified explicitly
cats_collection = client.get(Cat)
# filtering
cats_collection = client.get(Cat, query={'age': 1.5}) # get 1.5 years old cats
cats_collection = client.get(Cat, query={'age_gt': 1.0}) # cats older than 1 year
cats_collection = client.get(Cat, query={"name_like": "Sa*"}) # wildcard
# paging
cats_collection = client.get(Cat, query={"_start": "10", "_count": 10})
# ordering
cats_collection = client.get(Cat, query={"_orderby":"age"})
cats_collection = client.get(Cat, query={"_orderbydesc":"age"})
# learn more about filtering operators at: http://easyeasy.io/docs#/operators
# delete object by id
client.delete(cat.id, Cat)
Licence
ISC
Metadata
Release files for easyeasy 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| easyeasy-1.0.2.tar.gz | 2.8 kB | Without provenance | Details for easyeasy-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| easyeasy-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for easyeasy-1.0.2-py3-none-any.whl |
Total release size: 5.9 kB
Release files / easyeasy-1.0.2.tar.gz
| Download URL | easyeasy-1.0.2.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d62981189fdcde54b534ea82f15e3d8720f1877c2fd3b9e073f309bd94fb01b
|
|
BLAKE2b-256 checksum How to use checksums |
b8fc3524c268456cfd482eb60915ced80d0593547c23ee11669adb07ded9578d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / easyeasy-1.0.2-py3-none-any.whl
| Download URL | easyeasy-1.0.2-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44ca65dffb2c37a4bc5829cfcbeb0b5f177ca6d65490ca61f526489a7d4873d8
|
|
BLAKE2b-256 checksum How to use checksums |
fa80f4f6d831a452075e60a79a18c1017956446ffc58b73ee1d4913608b53718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for easyeasy 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.