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
Links
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)
| 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.