Skip to main content

IdeaPy is a simple WWW server built on top of CherryPy, with Python code execution feature

Project description

============================
IdeaPy (Idea for Python)
============================

IdeaPy is a simple WWW server built on top of CherryPy, with Python code execution feature.


Features
----------------------------------
- ability to execute Python code
just like Apache2 + mod_php
- all static files are streamed
by default
- you can add unlimited
number of virtual hosts
- one dependency: CherryPy


Example: "Hello World" in a IdeaPy
----------------------------------
python3 -m ideapy

go to http://localhost:8888/examples/default_page/
or http://localhost:8888/ to view directory listing


Own usage
----------------------------------

import ideapy

IdeaPy.setup_cherrypy() #optional
idea = IdeaPy()

idea.start()
idea.block()


Advanced usage
----------------------------------
import ideapy

IdeaPy.setup_cherrypy() #optional
idea = IdeaPy()

#change CherryPy config, like sessions, etc.

#now add some virtual hosts

#to serve content on http://localhost:8080
#with directory index disabled
idea.add_virtual_host(
document_root='/',
listen_ips=['127.0.0.1'],
listen_port=8080,
opt_indexes=False)

#to serve content on
#http://localhost:8080, http://api.localhost:8080, http://api:8080
#with directory index disabled
idea.add_virtual_host(
document_root='/',
listen_ips=['127.0.0.1'],
listen_port=8080,
server_name='localhost',
server_aliases=['api'],
opt_indexes=False)

#to serve /jinja2_app/ directory on
#http://virtualbox:8443, http://jinja2_app:8443, http://jinja2_app.virtualbox:8443
#https://virtualbox:8443, https://jinja2_app:8443, https://jinja2_app.virtualbox:8443
#with SSL enabled
idea.add_virtual_host(
document_root='/jinja2_app/',
listen_ips=['0.0.0.0'],
listen_port=8443,
server_name='virtualbox',
server_aliases=['jinja2_app'],
ssl_certificate = '/bundle.crt',
ssl_private_key = '/private_key.key')

idea.start()
idea.block()


Homepage
----------------------------------
https://github.com/skazanyNaGlany/ideapy

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ideapy-0.1.6.tar.gz (11.9 kB view details)

Uploaded Source

File details

Details for the file ideapy-0.1.6.tar.gz.

File metadata

  • Download URL: ideapy-0.1.6.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ideapy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 1bb2bac80fc976a328d91dc88fe8dd4f759295bbefb2532183c10ba16b8d7ad9
MD5 e94aca3c2ae57cb8ba6c30c024d29a64
BLAKE2b-256 8048fc049d8716e34f9a06d25bd944a425c062ca9fbdad9081531a0df6f09a03

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