Skip to main content

python-wappsto-rest

Usecase Examples:

import uuid
from wappstorest import WappstoRest
from wappstorest import WappstoService

wrest = WappstoRest()
wrest.login(
    username='the_user',
    password='SuperSecurePasswordThatYouDoNotRemember'
)


the_network = wrest.service(WappstoService.NETWORK).service_id(
    uuid.uuid4()
).read()

print(the_network.name)
print(the_network.meta.id)


wrest.logout()
from wappstorest import WappstoRest
from wappstorest import WappstoService
from wappstorest import WappstoPath
from wappstorest import WappstoSchema

wrest = WappstoRest()
wrest.login(
    username='the_user',
    password='SuperSecurePasswordThatYouDoNotRemember'
)


# Is this even possible?
device_list: WappstoSchema.response.IdList = wrest.service(
    WappstoService.DEVICE
).filter(
    WappstoPath.Device.meta.parent.name == "Production"
).read()

# Create a new device under an existing network
the_device: WappstoSchema.response.Device = wrest.service(
    WappstoService.DEVICE
).parent(
    parent_id=UUID("7b0cd39d-aa9a-487e-943e-e19b420e3396"),
    parent_service=WappstoService.NETWORK
).create(
    WappstoSchema.create.Device(
        name='button'
    )
)

wrest.logout()
import datetime

from wappstorest import WappstoRest
from wappstorest import WappstoService
from wappstorest import WappstoPath
from wappstorest import WappstoSchema

wrest = WappstoRest()
wrest.login(
    username='the_user',
    password='SuperSecurePasswordThatYouDoNotRemember',
    admin=True,
)

user_list: list[WappstoSchema.response.User] = wrest.service(
    WappstoService.USER
).filter(
    WappstoPath.User.meta.created < datetime.datetime.now()
).filter(
    "this.user.name~=test_"
).option(
    fullsearch=True,
).admin().read(expand=3)


wrest.logout()

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Notes:

  • update schema -> patch
  • create schema -> post
  • output schema -> response on anything.
  • query schema -> Options

Known Bugs

...

TODO List

Schema

  • Fix constr, conint ... to Field: Pydantic Schema.
  • There need to be a Create Schema & response schema (output).

Code base

  • Add more/better logging logs.
  • Push to pip.

Tests

  • Add more test to get a 100%-ish testing coverage.

v0.0.1 (Febuary 21, 2023)

Added

  • First Release.

Metadata

Release files for wappstorest 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wappstorest 0.1.0
File Size Uploaded Provenance Actions
wappstorest-0.1.0.tar.gz 93.2 kB Without provenance Details for wappstorest-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wappstorest 0.1.0
File Interpreter ABI Platform Actions
wappstorest-0.1.0-py3-none-any.whl Python 3 none any Details for wappstorest-0.1.0-py3-none-any.whl

Total release size: 453.1 kB

Release files / wappstorest-0.1.0.tar.gz

Download URL wappstorest-0.1.0.tar.gz
Size 93.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ce9ea2de364d60a189f8a9e45a1f8eba4a780616aa912a656885d29a4b7beb34
BLAKE2b-256 checksum
How to use checksums
0f15a844101aa454237ea803b7dec63025ea15a61eee8e663dd8307f19a57171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / wappstorest-0.1.0-py3-none-any.whl

Download URL wappstorest-0.1.0-py3-none-any.whl
Size 359.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d6b08e6b8ea207161091fa2207e896223a785e65bc4795f9fff8be85b29de23
BLAKE2b-256 checksum
How to use checksums
15ba0e2b9d2327043638484d4800582b0b8539e2d350566c48491c82fc90e21a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for wappstorest 0.1.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page