Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Autofront

Autofront is an automatic web interface for Python developers. In theory, any function or script can be triggered directly from a web browser on your local network. The function executes as normal and all print calls are displayed in the browser, along with any return value. Any input calls are redirected to the browser for user input.

This lets you control programs from your phone without needing to design an interface. Autofront can become a simple remote control and display for a Raspeberry Pi project, a command center for your programs, a music player, a simple prototype, anything you need.

The goal is to have basically no learning curve. With two imports and two lines of code, you can trigger a function from your phone. Autofront might not be compatible with your code, especially in these early alpha versions, but you'll find out quickly without wasting time. And if it works, you can go right back to programming the back-end.

We also hope it can be used in schools teaching basic Python programming. All student programs can be gathered on one page and run from any student's phone anywhere in the school. The next alpha version should add support for remote access as well so they can do the same outside school.

Autofront's page design is basic and functional. If the project proves popular, different templates might be developed for specific project types. You can also create a custom template to suit your needs, or use custom CSS and Javascript. This requires basic knowledge of web design and Flask. Read the Flask docs for more information.

If your function or script does not work with autofront, help us out by letting us know. Please make sure that you can correctly run the test suite on your system before raising an issue.

Wiki

Please consult the Autofront wiki for more detailed information on adding routes to functions and scripts. This readme only explains the basics.

Quickstart

Installing

Use pip:

pip install autofront

Autofront uses Flask to run the web server and will install it as a dependency if necessary. Since Autofront is still in alpha, it's recommended to install it in a virtual environment, if this is not already your usual procedure.

This link explains how to install packages and virtual environments.

Autofront requires Python 3.6 or higher and was tested on MacOS, Windows 10, Linux and Raspberry Pi. It hasn't been tested yet on Python 3.9 but should work in theory.

Usage

Basic usage is simple:

import autofront
from my_module import my_function

autofront.add(my_function)

autofront.run()
  • Create a new Python script.
  • Import autofront and your functions.
  • Add routes to your functions.
  • Start the server.

A Flask server will launch at 0.0.0.0:5000 (or localhost:5000). Access it from any browser on the same computer. You'll find a page with the name of your function and a "Go" button. Click it to trigger your function.

This is useful for development and gives you a simple web-based interface for your programs. But you can also easily access the server from your phone or another computer on the local network. When you start the server, autofront prints your local IP address to the console. Simply type the address in your browser (for example: 192.168.0.179:5000). Local IP addresses rarely change on your local network, so you can bookmark it for future use. If it does change, simply look it up in the console the next time you start your server.

If autofront fails to detect your local IP, you can easily google the correct method to find it on your operating system. Just google get local ip address [name_of_your_os].

You can now trigger your functions and scripts from any browser connected to your local network.

See Adding routes for more detailed information on adding routes to functions and scripts.

Contributing

Autofront is open to outside contributors. As it's currently in alpha, the process is still to be determined.

Credits

Autofront was designed by Jean-Michel Laprise.

Metadata

Release files for autofront 0.1.1a5

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

Source distribution (sdist)

Source distribution for autofront 0.1.1a5
File Size Uploaded Provenance Actions
autofront-0.1.1a5.tar.gz 40.1 kB Without provenance Details for autofront-0.1.1a5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for autofront 0.1.1a5
File Interpreter ABI Platform Actions
autofront-0.1.1a5-py3-none-any.whl Python 3 none any Details for autofront-0.1.1a5-py3-none-any.whl

Total release size: 86.1 kB

Release files / autofront-0.1.1a5.tar.gz

Download URL autofront-0.1.1a5.tar.gz
Size 40.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f8773fd9136db141be2323270559b521ea27f704c4849c438ea065e304949126
BLAKE2b-256 checksum
How to use checksums
b04a2b2278b10a5e3c8cc42cbcba9c91198357d1cc694f1af2a42137e8704104
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.9

Release files / autofront-0.1.1a5-py3-none-any.whl

Download URL autofront-0.1.1a5-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7a95a609b14072f7a2450d30a5fde7c0d47e8f5e5f78834a246a36180569c1d
BLAKE2b-256 checksum
How to use checksums
ec222991a72aae56cfd576fce29a0d3d450de70cd08c9e3faf0239bdd1c4f666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.9

Security for autofront 0.1.1a5

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
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