Skip to main content

CherryPy CGI-Server Tool

Mit dem CherryPy Tool cherrypy-cgiserver kann man aus CherryPy einen vollwertigen CGI-Server (Common Gateway Interface) machen. Damit lassen sich sogar PHP-Dateien ausführen und ausliefern. Es muss nur der PHP-Interpreter auf dem Computer installiert sein. Ein zusätzlicher Apache-Server ist nicht nötig.

So einfach lässt sich aus CherryPy ein vollwertiger PHP-Server machen:

#!/usr/bin/env python
# coding: utf-8

import os
import cherrypy
import cpcgiserver

THISDIR = os.path.dirname(os.path.abspath(__file__))

def main():
    config = {
        "global": {
            "server.socket_host": "0.0.0.0",
            "server.socket_port": 8080,
        },
        "/": {
            "tools.cgiserver.on": True,
            "tools.cgiserver.dir": THISDIR,
            "tools.cgiserver.base_url": "/",
            "tools.cgiserver.handlers": {".php": "/usr/bin/php-cgi"},
        }
    }
    app = cherrypy.Application(None, config = config)
    cherrypy.quickstart(app, config = config)

if __name__ == "__main__":
    main()

Installation

pip install cherrypy-cgiserver or easy_install cherrypy-cgiserver

Lizenzen

Metadata

Release files for cherrypy-cgiserver 0.3.6

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

Source distribution (sdist)

Source distribution for cherrypy-cgiserver 0.3.6
File Size Uploaded Provenance Actions
cherrypy-cgiserver-0.3.6.tar.gz 50.5 kB Without provenance Details for cherrypy-cgiserver-0.3.6.tar.gz

Release files / cherrypy-cgiserver-0.3.6.tar.gz

Download URL cherrypy-cgiserver-0.3.6.tar.gz
Size 50.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c98a57597bb461d02ae71d9a41e1756dc5bb36298dc917e71c84363c72275ce9
BLAKE2b-256 checksum
How to use checksums
fdc1ee6a93f55b301ad190859c48a1269cd448673ba75ec501afb4fd6741f569
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for cherrypy-cgiserver 0.3.6

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.3.6 This release

1 release file No provenance

0.3.4

0.3.3

0.3.2

0.3.1

0.2.9

0.2.7

0.2.6

0.2.5

0.2.4

0.2.4.a

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