Skip to main content

Unnoficial Python Client to access the GeoFluent API

Project description

# GeoFluent Python Client

Unnoficial Python Client to access the [GeoFluent API](http://www.lionbridge.com/geofluent/).

It has been developed by [Redlink GmbH](http://redlink.co/) in the context of the [SSIX Project](https://ssix-project.eu/).

## API

Upon usage of the [GeoFluent API](http://www.lionbridge.com/geofluent/) you **need to register** an account there.

You can find further technical documentation at:

* [API v3 Swagger Documentation](https://api.geofluent.com/Translation/swagger/docs/v3)
* [API v3 Swagger UI](https://api.geofluent.com/Translation/swagger/ui/index)

The current status of implementation of the [GeoFluent API](http://www.lionbridge.com/geofluent/)
is the following:

| Feature |Status |
|--- |--- |
| Detect | not implemented |
| HealthCheck | not implemented |
| Interpret | not implemented |
| Languages | **implemented** |
| Profile | not implemented |
| TermsOfService | not implemented |
| Transcribe | **implemented** |


## Instalation

The modules is [available from PyPI](https://pypi.python.org/pypi/geofluent),
so you just need to install it:

pip install geofluent

## Usage

### Library

from geofluent import GeoFluent

gf = GeoFluent(key=key, secret=secret)

// retrieve available languages
languages = [(i["source"]["code"], i["target"]["code"]) for i in gf.languages()]
print("Languages supported:" + ", ".join(["%s->%s" % language for language in languages]))

// translate from German to English
translation = gf.translate("Ich werde es testen", "de-de", "en-xn");
print("Translation: " + translation);

### Command-Line

You can can use the CLI tool to translate each line of file and get the translations back as CSV:

python3 geofluent/cli.py key secret source target file.txt

With `python3 geofluent/cli.py -h` you get some additional help of its usage.

### Microservice

In case you need to locally expose it as a microservice, the modules provides a dedicated utility to proxy that:

python3 geofluent/cli.py key secret [port]


## License

This tool is available under [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

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

geofluent-0.1.1.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distributions

geofluent-0.1.1-py3.5.egg (11.9 kB view hashes)

Uploaded Source

geofluent-0.1.1-py2.7.egg (11.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page