Skip to main content

Find the best window seat side to watch a sunrise or sunset on any flight.

Project description

seatside

Find the best window seat side to watch a sunrise or sunset on any flight.

Install

pip install seatside

To also run the API server:

pip install "seatside[server]"

Library usage

from datetime import datetime, timezone
from seatside import predict, PredictIn

result = predict(PredictIn(
    origin="JFK",
    destination="LHR",
    dep_utc=datetime(2025, 6, 21, 22, 0, tzinfo=timezone.utc),
    block_time_min=420,
    event="sunrise",
    aircraft_type="B777",
))

print(result.side)        # "A" (left/window) or "F" (right/window)
print(result.confidence)  # 0.0 – 1.0
print(result.rowBands)    # e.g. ["mid-aft", "forward"]

Error handling

from seatside import SeatsideError

try:
    result = predict(inp)
except SeatsideError as e:
    print(f"Could not compute: {e}")

API server

uvicorn seatside.server:app --reload
# POST http://localhost:8000/api/predict

Request body

{
  "origin": "JFK",
  "destination": "LHR",
  "dep_utc": "2025-06-21T22:00:00Z",
  "block_time_min": 420,
  "event": "sunrise",
  "aircraft_type": "B777"
}

Response

{
  "side": "A",
  "confidence": 0.83,
  "rowBands": ["mid-aft", "forward"],
  "timeline": [...],
  "polyline": "..."
}

Project details


Download files

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

Source Distribution

seatside-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

seatside-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file seatside-0.1.0.tar.gz.

File metadata

  • Download URL: seatside-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seatside-0.1.0.tar.gz
Algorithm Hash digest
SHA256 50ed06f68f1a19479125be3b2ec1147ad0006b789511bc681257fb57c406e6fa
MD5 efe946dd8f625950c1619397ae23d570
BLAKE2b-256 3f19c764994898e66cef2872bccf99849cd96c827ef60e7db8bb9c51d6d645b4

See more details on using hashes here.

File details

Details for the file seatside-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seatside-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seatside-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab076971b4fdbcc4bb9a06e53098ce3caababf003abda59f243607f1ee8fbbce
MD5 838c9dc080933b6592710b2fb27223a2
BLAKE2b-256 39fc2499bd95da037adc4cf4057130120645400010de53305ea962102b55dbce

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