futures is required for best performance.Goslate will batch and fetch concurrently for maximize speed. Set to None to disable multi thread support executor ( futures.ThreadPoolExecutor) – the multi thread executor for handling batch input, default to a global futures.ThreadPoolExecutor instance with 120 max thead workers if futures is avalible.URLs will be used randomly for better concurrent performance. service_urls ( single string or a sequence of strings) – google translate url list.debug ( bool) – Turn on/off the debug output.timeout ( int/float) – HTTP request timeout in seconds.retry_times ( int) – how many times to retry when connection reset error occured.If not provide, a default opener will be used.įor proxy support you should provide an opener with ProxyHandler opener ( urllib2.OpenerDirector) – The url opener to be used for HTTP/HTTPS query.WRITING_NATIVE_AND_ROMAN for both native and roman writing system. WRITING_NATIVE for native writing system.You have to first create an instance of Goslate to use this API Parameters: Goslate ( writing=(u'trans', ), opener=None, retry_times=4, executor=None, timeout=4, service_urls=(u'', ), debug=False ) ¶ Goslate: Free Google Translate API exception goslate.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |