Skip to main content

Project Description

HTTP-PyServer is a simple, and extremely light-weight solution to create powerful projects relying on the web with the fewest lines of code. It uses python built-in packages to host server's and then handle http requests, as well as responses. It's extremely customizable, and allows you do to almost everything you might want.

HTTP-PyServer is also very flexible on your project layout. It ensures security by allowing you to specify which files to send, and to where. HTTP-PyServer allows you to do everything you need whilst keeping hands relaxed with as few lines of code as possible.

Features

  • Return various filetypes (HTML, CSS, JS, JSON, Images, Video)
  • Get information from the users request (Headers, IP Addresses, Queries)
  • Handle any HTTP request type
  • Use a custom logger to record any server activity how you want
  • Utilizes multi-threading to ensure quick response times
  • Relies on NO NON-NATIVE LIBRARIES which leads to super quick runtimes
  • Handle wildcard routes to access different ressources
  • Cache information in the server and automaticall delete it after a certain time
  • Store user data in sessions to identify profiles
  • Integrate python code into your static files with templating

Installing

Install HTTP-PyServer using pip from the command line.

python -m pip install HTTP-PyServer

Simple Example

# Saved as "main.py"
import server

app = server.Server()

@app.route('/')
def _(request):

    return 'Hello, world!'

with app:
    
    app.wait('Press Enter to continue...')
$ python main.py
Press Enter to continue...

Contributing

Look on github, and create a fork of HTTP-PyServer. Submit pull requests, and any features will be looked at and potentially implemented.

Used Packages

Although, no external packages were used, the following packages were imported. All packages are native in Python 3.7+.

  • threading
  • socket
  • typing
  • logging
  • pathlib
  • re
  • time
  • json
  • urllib
  • mimetypes
  • enum
  • ssl
  • secrets

Metadata

Release files for HTTP-PyServer 0.1.4.4

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

Source distribution (sdist)

Source distribution for HTTP-PyServer 0.1.4.4
File Size Uploaded Provenance Actions
http_pyserver-0.1.4.4.tar.gz 12.5 kB Without provenance Details for http_pyserver-0.1.4.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for HTTP-PyServer 0.1.4.4
File Interpreter ABI Platform Actions
http_pyserver-0.1.4.4-py3-none-any.whl Python 3 none any Details for http_pyserver-0.1.4.4-py3-none-any.whl

Total release size: 28.1 kB

Release files / http_pyserver-0.1.4.4.tar.gz

Download URL http_pyserver-0.1.4.4.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
96ba56c3ab8a00fe24ddb54c09f338dd3ae9ba9db03973e9e3de9ef123488af2
BLAKE2b-256 checksum
How to use checksums
81433161b96ee1cc74579312c6ad75b17aa6928f481537e39249ae7f8d92f8a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / http_pyserver-0.1.4.4-py3-none-any.whl

Download URL http_pyserver-0.1.4.4-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cffd42184eb841f84f209e91f9bb8b0cfcc723a12a34d55e0d2acfcdc90c3a39
BLAKE2b-256 checksum
How to use checksums
5d87cecb5d51dab9d252c552f61c215d86b765a34485ec75dd9b16e1a6576a53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for HTTP-PyServer 0.1.4.4

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