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.4.0.tar.gz (10.4 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.4.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for altspell-0.4.0.tar.gz
Algorithm Hash digest
SHA256 2f9b584be6316c35845f966a596fd22253e5142902efc6e84772e75e737e6a3a
MD5 7bfc363c1c5495a3d7601b529e3645fb
BLAKE2b-256 b2a1091c75586dc218b2f460673b6a50a27c0cd36d6396feaca250cf8c9aa196

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for altspell-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a941efa5b85c7ed565015a106162677baa7db2e2463531de6ffb3d3f6e10986
MD5 0e13cf65f0cd4425ffb0c627ee0a2b16
BLAKE2b-256 977a12c6729b86c8bc5cca763639eaeea326a8800b65f82b2de763deea94c472

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