Skip to main content
# lazyhttp

Drop in replacement for `http.server` with convenience methods added.

```python
import json
import http.server

import lazyhttp

class Handler(lazyhttp.Handler):

def req(self, task):
if '/create' in self.path or '/update' in self.path and \
self.has(task, 'id', 'text'):
TASKS[task['id']] = task
elif '/delete' in self.path and self.has(task, 'id'):
del TASKS[task['id']]
elif '/get' in self.path and self.has(task, 'id'):
self.json(TASKS[task['id']])
elif '/all' in self.path:
self.json(TASKS)
else:
self.err('Nothing to do')

if __name__ == '__main__':
lazyhttp.run(Handler)
```

Metadata

Release files for lazyhttp 0.0.3

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

Source distribution (sdist)

Source distribution for lazyhttp 0.0.3
File Size Uploaded Provenance Actions
lazyhttp-0.0.3.tar.gz 2.5 kB Without provenance Details for lazyhttp-0.0.3.tar.gz

Release files / lazyhttp-0.0.3.tar.gz

Download URL lazyhttp-0.0.3.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f5d637fcc0b1d0bc0291bcba5d4e72df47dff1eecf6d943e54041ddd23619eac
BLAKE2b-256 checksum
How to use checksums
a691eddd90219597d15173da38a874472f2eb86e94e909786100c2aea72f714d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for lazyhttp 0.0.3

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

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