Branko Vukelic  committed ce9b153

Preparing for 0.0.1 release

  • Participants
  • Parent commits a8adbc4

Comments (0)

Files changed (3)

+2012-11-29 released 0.0.1
+* Working ``Translate`` method
 Installing and using PyMSTranslator
+Install from pip::
+    pip install pymstranslator
 Basic usage
+Before you can use the Microsoft Translator API, you need to register your app.
+Once you do that, you will receive client ID and client secret. Note these
+Creating the access key
+Once in your application's initialization code, you must create the access key
+(access token). This is best done in such a way that the access key is always
+available to parts of your application that may require the key. Once created, 
+the will be valid for 10 minutes and is cached to avoid repeated requests to
+the authorization server. Here is an example::
+    >>> from mstranslator import MSTranslatorAccessKey
+    >>> key = MSTranslatorAccessKey(client_id, client_secret)
+Creating the Microsoft Translator client object
+The client object is crated using the key crated in the `Creating the access
+key`_ section::
+    >>> from mstranslator import MSTranslator
+    >>> translator = MSTranslator(key)
+The client object currently only has one useful method, and that is
+``translate``. To translate a string, call the method like so::
+    >>> translator.translate(text='Si vous plais', tfrom='fr', to='en')
+    "If you'd like"
+Microsoft Translator API coverage
+Currently, only the ``Translate`` method has been implemented. The goal for 1.0
+release is to include all of the Microsoft Translator API v2.
+For the most part, the API of Microsoft Translator methods should be almost
+identical in PyMSTranslator except for a few details:
++ Method names are always lower-case using underscores to separate words (e.g.,
+  ``TranslateArray`` becomes ``translate_array``)
++ Same applies to parameters (e.g., ``contentType`` becomes ``content_type``)
++ Parameter names that match Python built-in names are prefixed with ``t``
+  (e.g., ``from`` becomes ``tfrom``, ``format`` becomes ``tformat``)
+There is currently no caching of the translations. Caching mechanism is planned
+for 1.0 release, though, with an interface compatible with the Django's caching
+mechanism. For now, caching must be done separately.
 Reporting bugs
+from distutils.core import setup
+    name='pymstranslator',
+    description='Python module for interfacing with Microsoft(r) Translator'
+    long_description=open('README.rst').read(),
+    version='0.0.1',
+    packages=['mstranslator'],
+    author='Monwara LLC',
+    author_email='',
+    url='',
+    download_url='',
+    license='BSD',
+    classifiers = [
+        'Development Status :: 2 - Pre-Alpha',
+        'Intended Audience :: Developers',
+        'License :: OSI Approved :: BSD License',
+    ],