Skip to main content

No project description provided

Project description

Octopusserver

Octopus

How to install

Pypi

pip install octopusserver

Poetry

poetry add octopusserver

Getting Started

from octopusserver import Octopus
from octopusserver import Request
from octopusserver import Response

PORT = 3000

app = Octopus(PORT)

def hello_world(req: Request, res: Response):
    res.send("Hello, World!")

app.router.get("/", [hello_world])

app.listen(lambda: print(f"Server listen on http://localhost:{ PORT }/"))

How to register your application's routes

from octopusserver import Octopus

PORT = 3000

app = Octopus(PORT)

router = app.router

router.get("path/to/get/route/", [trigger_get_route])

router.post("path/to/post/route/", [trigger_post_route])

For the future

  • Recive files
  • Handling post and get data

How did I do this?

Here

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octopusserver-0.1.4.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octopusserver-0.1.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file octopusserver-0.1.4.tar.gz.

File metadata

  • Download URL: octopusserver-0.1.4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.4.0-137-generic

File hashes

Hashes for octopusserver-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5b2ce080ffc1469537c992238cb84f2daf51d66d05aa22d2110120c2937fa35e
MD5 e1e71b3de4feb6be564c1d02ca19df09
BLAKE2b-256 17440406f23091ca6323c2ad29628ec7b1be3e18bde890a8bd0392729c18c553

See more details on using hashes here.

File details

Details for the file octopusserver-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: octopusserver-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.5 Linux/5.4.0-137-generic

File hashes

Hashes for octopusserver-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 54b579aa22f29b26c9edcf976148d39e8327dcff21089b4923d1ad07e61b4f8a
MD5 68c828ce03b020f5ceab5d3633680b7a
BLAKE2b-256 ef82b2866b31554a54f35d3196d39ff9c0e0d0716eeaecda9c69e7ae38194630

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page