{"id":22880004,"url":"https://github.com/apertium/apertium-apy","last_synced_at":"2025-04-04T20:08:36.976Z","repository":{"id":3225879,"uuid":"48734227","full_name":"apertium/apertium-apy","owner":"apertium","description":"📦 Apertium HTTP Server in Python","archived":false,"fork":false,"pushed_at":"2025-03-26T14:48:24.000Z","size":15484,"stargazers_count":35,"open_issues_count":58,"forks_count":44,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-01T11:47:39.760Z","etag":null,"topics":["apertium","apertium-tools","machine-translation","mt","server"],"latest_commit_sha":null,"homepage":"https://wiki.apertium.org/wiki/Apertium-apy","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apertium.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-29T07:26:04.000Z","updated_at":"2025-03-25T11:42:52.000Z","dependencies_parsed_at":"2024-11-06T15:24:31.280Z","dependency_job_id":"d2d54eaa-562d-44f0-8a1e-6c2c56fe74ba","html_url":"https://github.com/apertium/apertium-apy","commit_stats":{"total_commits":730,"total_committers":40,"mean_commits":18.25,"dds":0.6643835616438356,"last_synced_commit":"1c53d4595ecd77b5102e9ac66fdd921bbfa8ca39"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apertium%2Fapertium-apy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apertium%2Fapertium-apy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apertium%2Fapertium-apy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apertium%2Fapertium-apy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apertium","download_url":"https://codeload.github.com/apertium/apertium-apy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apertium","apertium-tools","machine-translation","mt","server"],"created_at":"2024-12-13T17:10:33.706Z","updated_at":"2025-04-04T20:08:36.944Z","avatar_url":"https://github.com/apertium.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Apertium APy\n============\n\n[![Build Status](https://github.com/apertium/apertium-apy/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/apertium/apertium-apy/actions/workflows/main.yml?query=branch%3Amaster++)\n[![Coverage Status](https://coveralls.io/repos/github/apertium/apertium-apy/badge.svg?branch=master)](https://coveralls.io/github/apertium/apertium-apy?branch=master)\n[![PyPI](https://img.shields.io/pypi/v/apertium-apy.svg)](https://pypi.org/project/apertium-apy/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/apertium-apy.svg)](https://pypi.org/project/apertium-apy/)\n\nApertium APy, **Apertium A**PI in **Py**thon, is a web server exposing Apertium\nfunctions including text, document, and webpage translation, as well as morphological\nanalysis and generation. More information is available on the [Apertium Wiki][1].\n\nRequirements\n------------\n\n- Python 3.9+\n- Tornado 4.5.3 - 6.0.4 (`python3-tornado` on Debian/Ubuntu)\n\nAdditional functionality is provided by installation\nof the following packages:\n\n- `apertium-streamparser` enables spell checking\n- `requests` enables suggestion handling\n- `chromium_compact_language_detector` enables improved language detection (cld2)\n- `chardet` enables website character encoding detection\n- `commentjson` allows to keep API keys in commented json\n- `lxml` enables pair preferences\n\nPrecise versions are available in `requirements.txt` and `setup.py`.\n\nInstallation\n------------\n\nBefore you install, you can try out a live version of APy at [apertium.org][2].\n\nAPy is available through [PyPi](https://pypi.org/project/apertium-apy/):\n\n    $ pip install apertium-apy\n\nOn Ubuntu/Debian, it is also available through `apt`:\n\n    $ wget -qO- https://apertium.projectjj.com/apt/install-nightly.sh | bash\n    $ apt-get install apertium-apy\n\nFinally, [GitHub Container Registry][3] hosts an image of the provided\n`Dockerfile` with entry point `apertium-apy` exposing port 2737:\n\n    $ docker pull ghcr.io/apertium/apy\n\nUsage\n-----\n\nInstallation through `apt` or `pip` adds an `apertium-apy` executable:\n\n    $ apertium-apy --help\n    usage: apertium-apy [-h] [-s NONPAIRS_PATH] [-l LANG_NAMES] [-F FASTTEXT_MODEL]\n                      [-f MISSING_FREQS] [-p PORT] [-c SSL_CERT] [-k SSL_KEY]\n                      [-t TIMEOUT] [-j [NUM_PROCESSES]] [-d] [-P LOG_PATH]\n                      [-i MAX_PIPES_PER_PAIR] [-n MIN_PIPES_PER_PAIR]\n                      [-u MAX_USERS_PER_PIPE] [-m MAX_IDLE_SECS]\n                      [-r RESTART_PIPE_AFTER] [-v VERBOSITY] [-V] [-S]\n                      [-M UNKNOWN_MEMORY_LIMIT] [-T STAT_PERIOD_MAX_AGE]\n                      [-wp WIKI_PASSWORD] [-wu WIKI_USERNAME] [-b]\n                      [-rs RECAPTCHA_SECRET] [-md MAX_DOC_PIPES] [-C CONFIG]\n                      [-ak API_KEYS]\n                      pairs_path\n\n    Apertium APY -- API server for machine translation and language analysis\n\n    positional arguments:\n      pairs_path            path to Apertium installed pairs (all modes files in\n                            this path are included)\n\n    options:\n      -h, --help            show this help message and exit\n      -s NONPAIRS_PATH, --nonpairs-path NONPAIRS_PATH\n                            path to Apertium tree (only non-translator debug modes\n                            are included from this path)\n      -l LANG_NAMES, --lang-names LANG_NAMES\n                            path to localised language names sqlite database\n                            (default = langNames.db)\n      -F FASTTEXT_MODEL, --fasttext-model FASTTEXT_MODEL\n                            path to fastText language identification model (e.g.\n                            lid.release.ftz)\n      -f MISSING_FREQS, --missing-freqs MISSING_FREQS\n                            path to missing word frequency sqlite database\n                            (default = None)\n      -p PORT, --port PORT  port to run server on (default = 2737)\n      -c SSL_CERT, --ssl-cert SSL_CERT\n                            path to SSL Certificate\n      -k SSL_KEY, --ssl-key SSL_KEY\n                            path to SSL Key File\n      -t TIMEOUT, --timeout TIMEOUT\n                            timeout for requests (default = 10)\n      -j [NUM_PROCESSES], --num-processes [NUM_PROCESSES]\n                            number of processes to run (default = 1; use 0 to run\n                            one http server per core, where each http server runs\n                            all available language pairs)\n      -d, --daemon          daemon mode: redirects stdout and stderr to files\n                            apertium-apy.log and apertium-apy.err; use with --log-\n                            path\n      -P LOG_PATH, --log-path LOG_PATH\n                            path to log output files to in daemon mode; defaults\n                            to local directory\n      -i MAX_PIPES_PER_PAIR, --max-pipes-per-pair MAX_PIPES_PER_PAIR\n                            how many pipelines we can spin up per language pair\n                            (default = 1)\n      -n MIN_PIPES_PER_PAIR, --min-pipes-per-pair MIN_PIPES_PER_PAIR\n                            when shutting down pipelines, keep at least this many\n                            open per language pair (default = 0)\n      -u MAX_USERS_PER_PIPE, --max-users-per-pipe MAX_USERS_PER_PIPE\n                            how many concurrent requests per pipeline before we\n                            consider spinning up a new one (default = 5)\n      -m MAX_IDLE_SECS, --max-idle-secs MAX_IDLE_SECS\n                            if specified, shut down pipelines that have not been\n                            used in this many seconds\n      -r RESTART_PIPE_AFTER, --restart-pipe-after RESTART_PIPE_AFTER\n                            restart a pipeline if it has had this many requests\n                            (default = 1000)\n      -v VERBOSITY, --verbosity VERBOSITY\n                            logging verbosity\n      -V, --version         show APY version\n      -S, --scalemt-logs    generates ScaleMT-like logs; use with --log-path;\n                            disables\n      -M UNKNOWN_MEMORY_LIMIT, --unknown-memory-limit UNKNOWN_MEMORY_LIMIT\n                            keeps unknown words in memory until a limit is\n                            reached; use with --missing-freqs (default = 1000)\n      -T STAT_PERIOD_MAX_AGE, --stat-period-max-age STAT_PERIOD_MAX_AGE\n                            How many seconds back to keep track request timing\n                            stats (default = 3600)\n      -wp WIKI_PASSWORD, --wiki-password WIKI_PASSWORD\n                            Apertium Wiki account password for SuggestionHandler\n      -wu WIKI_USERNAME, --wiki-username WIKI_USERNAME\n                            Apertium Wiki account username for SuggestionHandler\n      -b, --bypass-token    ReCAPTCHA bypass token\n      -rs RECAPTCHA_SECRET, --recaptcha-secret RECAPTCHA_SECRET\n                            ReCAPTCHA secret for suggestion validation\n      -md MAX_DOC_PIPES, --max-doc-pipes MAX_DOC_PIPES\n                            how many concurrent document translation pipelines we\n                            allow (default = 3)\n      -C CONFIG, --config CONFIG\n                            Configuration file to load options from\n      -ak API_KEYS, --api-keys API_KEYS\n                            Configuration file to load API keys\n\nContributing\n------------\n\nAPy uses [GitHub Actions][4] for continuous integration. Locally, use `make test`\nto run the same checks it does. After installing [Pipenv][5], run `pipenv install --dev`\nto install the requirements required for development, e.g. linters.\n\n[1]: https://wiki.apertium.org/wiki/Apertium-apy\n[2]: https://apertium.org/apy/listPairs\n[3]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry\n[4]: https://github.com/apertium/apertium-apy/actions\n[5]: https://pipenv.pypa.io/en/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapertium%2Fapertium-apy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapertium%2Fapertium-apy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapertium%2Fapertium-apy/lists"}