Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_HOST=
API_KEY=
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,31 @@ with lilt.ApiClient(configuration) as api_client:

```

## Checking Credentials

If you would like to test your credentials using our functionality tests you can do the following. Run:

```sh
pip show lilt-python
```

Navigate to the Location field and create a .env file inside the package using .env_example as a template. Fill out the API_HOST and API_KEY lines using the credentials you were given.

Then while inside the package folder, run:

```sh
pip install -r test-requirements.txt
```

Followed by:

```sh
local_test
```

You should be able to see the tests run.


## Documentation for API Endpoints

All URIs are relative to *https://api.lilt.com*
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
include_package_data=True,
long_description="""\
Lilt REST API Support: https://lilt.atlassian.net/servicedesk/customer/portals The Lilt REST API enables programmatic access to the full-range of Lilt backend services including: * Training of and translating with interactive, adaptive machine translation * Large-scale translation memory * The Lexicon (a large-scale termbase) * Programmatic control of the Lilt CAT environment * Translation memory synchronization Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests. The base url for this REST API is `https://api.lilt.com/`. ## Authentication Requests are authenticated via REST API key, which requires the Business plan. Requests are authenticated using [HTTP Basic Auth](https://en.wikipedia.org/wiki/Basic_access_authentication). Add your REST API key as both the `username` and `password`. For development, you may also pass the REST API key via the `key` query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use. ## Quotas Our services have a general quota of 4000 requests per minute. Should you hit the maximum requests per minute, you will need to wait 60 seconds before you can send another request. # noqa: E501
"""
""",
entry_points = {
'console_scripts': ['local_test=workflow_tests.local_test:main']
}
)
4 changes: 4 additions & 0 deletions workflow_tests/local_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pytest

def main():
retcode = pytest.main(["workflow_tests"])