Skip to main content

A flask web API for translating between traditional English spellings and alternative spellings

Project description

Altspell

Flask web app for translating traditional English to respelled English and vice versa.

Quick Start

Execute the following commands to get the web API up and running:

# Activate virtual environment
python3 -m venv venv
source venv/bin/activate

# Install main program
pip install altspell

# Install a few plugins
pip install altspell-lytspel \
            altspell-portul \
            altspell-soundspel

# Start web API
flask --app altspell run

Example HTTP requests:

# List available spelling systems
curl -X GET -H "Accept: application/json" http://127.0.0.1:5000/api/v1/spelling-systems

# Perform forward translation and save the result in the database
curl -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d  '{
    "text": "Hello, world!",
    "spellingSystem": "lytspel",
    "forward": true,
    "save": true
}' http://127.0.0.1:5000/api/v1/translations

# Retrieve the saved result from the database
# translation_id comes from the HTTP response of the previous command
curl -X GET -H "Accept: application/json" http://127.0.0.1:5000/api/v1/translations/{translation_id}

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

altspell-0.3.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

altspell-0.3.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file altspell-0.3.0.tar.gz.

File metadata

  • Download URL: altspell-0.3.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for altspell-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cdb1784335064b26f0e421bfb1461b4efd7468f155ce497dd0a1046602287e8f
MD5 86d90fb80278c7d30e2c42f26f70c397
BLAKE2b-256 ebdc25be08f60a098f59243c867632f004def926a62288517645e7aea97fdbb4

See more details on using hashes here.

File details

Details for the file altspell-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: altspell-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for altspell-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6033754f6ad17e1136904e07182db065be26ec24ec5a2b3aa48538e11d890e1
MD5 cae109dab504322ac6c01935261b52ff
BLAKE2b-256 2eb413ec5652a5b81b91d09727cc0c17cea88d53c893e93b3e9ca7f0f93a5931

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