Package translate :: Package services :: Module tmserver :: Class TMServer

[hide private]
[frames] | no frames]

# Class TMServer

source code

A RESTful JSON TM server.

Instance Methods | [hide private]

__init__(self, tmdbfile, tmfiles, max_candidates=3, min_similarity=75, max_length=1000, prefix="", source_lang=None, target_lang=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

translate_unit(self, environ, start_response, uid, slang, tlang) | source code

add_unit(self, environ, start_response, uid, slang, tlang) | source code

update_unit(self, environ, start_response, uid, slang, tlang) | source code

forget_unit(self, environ, start_response, uid) | source code

get_store_stats(self, environ, start_response, sid) | source code

upload_store(self, environ, start_response, sid, slang, tlang) add units from uploaded file to tmdb | source code

add_store(self, environ, start_response, sid, slang, tlang) Add unit from POST data to tmdb. | source code

forget_store(self, environ, start_response, sid) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, tmdbfile, tmfiles, max_candidates=3, min_similarity=75, max_length=1000, prefix="", source_lang=None, target_lang=None)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

### translate_unit(self, environ, start_response, uid, slang, tlang)

source code

Decorators:
  - `@selector.opliant`

### add_unit(self, environ, start_response, uid, slang, tlang)

source code

Decorators:
  - `@selector.opliant`

### update_unit(self, environ, start_response, uid, slang, tlang)

source code

Decorators:
  - `@selector.opliant`

### forget_unit(self, environ, start_response, uid)

source code

Decorators:
  - `@selector.opliant`

### get_store_stats(self, environ, start_response, sid)

source code

Decorators:
  - `@selector.opliant`

### upload_store(self, environ, start_response, sid, slang, tlang)

source code

add units from uploaded file to tmdb

Decorators:
  - `@selector.opliant`

### add_store(self, environ, start_response, sid, slang, tlang)

source code

Add unit from POST data to tmdb.

Decorators:
  - `@selector.opliant`

### forget_store(self, environ, start_response, sid)

source code

Decorators:
  - `@selector.opliant`