Skip to main content

Dynamic Command WebServer (dycow)

Downloads PyPI version License: MIT

A tiny web-server app with a configuration file, NO NEED TO CODE

dycow-demo

Introduction

This project is a small webserver that just have to get a port and a configuration file to perform preconfigurated commands.

Disclaimer

This was a test-research project for a specific user-case on my raspberry-pi, therefore, i configurated only two methods (GET and POST)

Why use dycow

  • It's fast
  • Simple to configure, you just have to create a conf file to be ready to start
  • It's lightweight (The wheel is ~5Kb)

Requirements

  • Python (3.x recommend)

How to install

You just have to run :

pip install dycow

How to use

$ dw -h

[-] dycow v0.0.9.7.
[-] Help center !
[x] Run : dw <port> <conf-file> 
[x] Documentation online https://github.com/sanix-darker/dycow

You have to create a file, for example conf and set actions, for example :

dycow-demo

- GET(or - POST) is the type of the request, just after it the endPoint (/save, /callme?name&content).
cmd is the command line that will be executed on a request.
res[NOT REQUIRED] is the response to the request.
var is to specify POST variables. \

Variables like #content# means, the content variable will be replace with the input value as parameter.

  • Then run the server application:
# dw <port> <configuration-file>
dw 3000 conf

It will start a small server on port 3000 and following rules you specified in the configuration file.

Tests

To run rest-api tests, i made a bash file in ./tests directory.
you just have to run bash ./tests/rest-api-test.sh

$ bash ./tests/rest-api-test.sh 
[-] Running Endpoints tests on dycow.
[✓] GET / passed.
[✓] GET /list passed.
[✓] GET /callme?name=darker passed.
[✓] POST /save passed.
- - -
[-] Tests run :
[-] 4 tests succeed !
[-] 0 tests failed !
[-] Stopping tests Endpoints on dycow.

Author

LICENSE

Metadata

Release files for dycow 0.1.0.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 dycow 0.1.0.0
File Size Uploaded Provenance Actions
dycow-0.1.0.0.tar.gz 5.3 kB Without provenance Details for dycow-0.1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.1 kB

Release files / dycow-0.1.0.0.tar.gz

Download URL dycow-0.1.0.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d17a05fff36b3a43173cf922a0e896cfc12192fe3f9c4252e486f8d96514054d
BLAKE2b-256 checksum
How to use checksums
49f050cc171d53a80632cf979d1fd77fde254404206dc333c1a52cbd2353c594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Release files / dycow-0.1.0.0-py3-none-any.whl

Download URL dycow-0.1.0.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f869c4f5b7ac4ca7038503d245c37b8e861bced6bfd103fad881eae7bbe7480
BLAKE2b-256 checksum
How to use checksums
b091ef223200bd0c8437b44f5f3fd4ea248801e6f436443c76d859fcd141cce0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

Security for dycow 0.1.0.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