Skip to main content

Sextile

Sextile

CI PyPI Python Licence Docs

A framework for Viewdata services, in Python. Sextile is to a Prestel-style service what Flask or Starlette is to a web application: it owns the connection, the session, the page numbering and the frames on the wire, and you write what the pages say. The documentation opens with what Viewdata is.

uv add sextile          # or pip install sextile
from sextile import Page, PageRequest, Sextile, notice_page

app = Sextile(name="My service")

@app.page("1", name="main", keywords=("MAIN",))
async def main(request: PageRequest) -> Page:
    return notice_page(request, "Hello, 1981.")
sextile serve my_service:app     # answer calls on port 16650
nc localhost 16650                # and call it

What it gives you

Routing by page number. Patterns of literal digits and named fields, so 82{post_id:int} answers every page beginning 82 and hands the rest to the handler already read as an integer. app.address_for("post", post_id=...) reads the same pattern backwards, so a page linking to another does not respell the numbering. Keywords — *MAIN# for *1# — are the route's keywords=.

Sessions that last as long as the line. A Viewdata terminal is a display and nothing more: it holds the frame on screen and nothing else. So the server holds where the reader is, what they have seen, and the menu they came through, and a handler is a function of a request rather than of a number. The reasoning is in the explanation.

The wire, measured rather than assumed. Attributes travel as ESC + code + 0x40, a frame is 24 rows of 40 that wraps at the bottom-right back to the top left, RETURN transmits 0x5F. Those were settled by driving real Commstar under an emulator, and are written up in the encoding reference.

Nobody is cut off without warning. After half the idle timeout a silent caller's footer becomes a bar that drains, reading Press a key. The first key dismisses it and does nothing else, so it is safe to press whatever comes to hand. Every service gets this without writing anything.

Forty columns, accounted for. A colour attribute occupies a character cell, so a row that changes colour twice has thirty-eight columns for text. Canvas does that arithmetic so nothing above it has to.

Drawable without a Beeb. sextile render draws any page four ways: ansi colour as the Beeb would draw it, grid for the character and attribute layers, bytes for the wire stream, and html for a self-contained web page with the Bedstead font embedded, opening from disk with no server.

Documentation

The full documentation is at rob-smallshire.github.io/sextile: the tutorial builds a service step by step, the how-to guides answer particular questions, the reference states the surface, the glossary and the wire, and the explanation says why the framework is shaped as it is.

Status

Young, and extracted from a working service rather than designed in the abstract. Three applications use it in the source repository: a real Stardot forum reader, a weather service, and a calendar written to be read.

MIT licensed. The bundled font faces and the Bedstead font are third-party material; see NOTICE.md.

Download files

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

Source Distribution

sextile-0.1.3.tar.gz (386.2 kB view details)

Uploaded Source

Built Distribution

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

sextile-0.1.3-py3-none-any.whl (280.2 kB view details)

Uploaded Python 3

File details

Details for the file sextile-0.1.3.tar.gz.

File metadata

  • Download URL: sextile-0.1.3.tar.gz
  • Upload date:
  • Size: 386.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sextile-0.1.3.tar.gz
Algorithm Hash digest
SHA256 86bc987792310de02b3b51f507a722d4d6c6ad0987e9cc0651dca124168dd8cc
MD5 75651c9ea1f848d70975b77cfa2bcfdf
BLAKE2b-256 651c61fd6c57e6e982932a6b77f8bf376af8549cfe313294e4c407256a99d56f

See more details on using hashes here.

File details

Details for the file sextile-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sextile-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 280.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sextile-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb692add6e69c64571f1f718ddb89dd1693b7d0be6490d18ba0e23f748bdaec
MD5 265141e10ca3f3e738764c4031337925
BLAKE2b-256 56544b90c2efc105f69f74a90ced209ab879614c8297d648684a94f17f5b8b06

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.2

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.5

2 files

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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