Skip to main content

Archangel is a webserver designed to be fast and easy to use for personal usage. It was created to replace an internal webserver based off of flup for fcgi and wsgiref for http serving (basically anything would be an improvement) as well as explore the new pep-3156/Tulip based library by Guido van Rossum

Archangel is designed to be ‘fast’. This does not mean however that archangel is fast, Archangel is instead intended to explore how fast a server using an event loop based of tulip can be made to go and what is needed to get it there.

As an additional side effect it should serve as a light house in the fog as to what you should or should not do with Tulip (Of course it is still yet to be determine on which side of the divide Archangel ends up)

Tenets:

Only do things when we need to:

Do things “Just in Time”

Only do things we have to:

Be lazy

Do it quickly:

Go back to sleep as fast as possible

What Archangel provides

  • Pre-forking Webserver

  • WSGI connector

  • The ability to run multiple dissimilar WSGI apps in the same process and route requests to them individually based off of PATH_INFO or HOST headers

What Archangel does not provide

  • ‘Cron’ like functionality, this is now implemented via Tulip. get a copy of the mainloop with loop = tulip.get_event_loop(), then attach your cron function with loop.call_repeatably(15.0, my_cron) which will call your my_cron function every 15 seconds

  • Unix Signal support, this functionality is already provided by Tulip via the add_signal_handler functionality

  • Long running background tasks. Tulip can be used to launch background contexts via call_soon. note that CPU bound tasks should yield periodically to prevent blocking of other tasks or use run_in_executor provided by the main loop.

Possible Future Features

  • Internal ‘signalling’ allowing applications to signal each other and respond accordingly

Compatibility Notes

  • For performance, any 3rd party library you use will need to be tulip/pep-3156 compatible and return a future on blocking calls so that it may be yield from’d. libraries using open() and socket.socket or other blocking calls will still work without issue but will prevent other requests from being handled while the system call is blocked

  • To use traditional style locks and events, use the implementations in tulip rather than the threading library

TWIG: Tulipe Webservices Gateway Interface

Archangel provides a test-bed for developing a new protocol loosely based off of pep-3333/WSGI, Designed for use with Tulip and providing a more ‘stream’ like interface. This can be used to implement long polling clients as well as support traditional WSGI like request/response through the use of middleware that will be bundled with Archangel.

An inital draft of the TWIG spec can be found here

Requirements

  • Python 3.3 or greater

  • Distutils2 (to replace setup.py, a fallback is provided)

  • A copy of the Tulip library

  • PyYaml for parsing the config files

Getting the Latest version

The latest version of Archangel can be obtained with mercurial/hg using the following command:

hg clone http://code.pocketnix.org/archangel

Change Log

0.3

  • Added twig module

  • Added Request object

  • Added Response object

  • Expand on TWIG PEP

0.2.1

  • Minor bump to update filenames (WSGI-STREAM => TWIG)

0.2: Fresh Breeze

  • Split code into modules

  • Name changes to WSGIProtocol and friends, now split along ‘FCGI’ and ‘HTTP’ lines

  • Framework can make requests with to a special function using a ‘looks like wsgi if you squint hard enough’ protocol

0.1.2

  • Added WSGI-STREAM spec

  • Refined documentation and links

  • Added Changelog

0.1.1

  • Inital code

  • README file

Release files for archangel 0.3

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

Source distributions (sdists)

Source distribution for archangel 0.3
File Size Uploaded
archangel-0.3.zip 15.5 kB Details
archangel-0.3.tar.gz 10.6 kB Details

Release files / archangel-0.3.zip

Download URL archangel-0.3.zip
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
769b6d60975737060bdf9b01dfb4c8035c39ecfac84d6b281dbca6f0e25ca719
BLAKE2b-256 checksum
How to use checksums
b1360fe99b3e750fe30cc29da8674a5ec1c2d9deba038bcac32a92cdf262fc37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / archangel-0.3.tar.gz

Download URL archangel-0.3.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6412e9b4a40c74b52037ba54495861c72638c59aeb7348e8392a6cfe4ed2e807
BLAKE2b-256 checksum
How to use checksums
b8186ae056f2a80697843b04859ed2c547c19d61d31d090c02ac7e87ac44122a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

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