Metadata-Version: 1.1
Name: transfluent
Version: 0.1.0
Summary: A Python wrapper for Transfluent API
Home-page: http://github.com/jpvanhal/python-transfluent
Author: Janne Vanhala
Author-email: janne.vanhala@gmail.com
License: Copyright (c) 2013 Janne Vanhala

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of the Sentry nor the names of its contributors may be
       used to endorse or promote products derived from this software without
       specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Description: Transfluent API Client for Python
        =================================
        
        |build status|_
        
        .. |build status| image:: https://secure.travis-ci.org/jpvanhal/python-transfluent.png?branch=master
           :alt: Build Status
        .. _build status: http://travis-ci.org/jpvanhal/python-transfluent
        
        This is a Python wrapper for the `Transfluent API <http://transfluent.com/backend-api/>`_.
        
        Installation
        ------------
        
        ::
        
            $ pip install transfluent
        
        Usage
        -----
        
        .. code-block:: python
        
            import transfluent
        
            # Initialize the Transfluent client and retrieve your authentication
            # token by using your email and password.
            client = transfluent.Transfluent()
            client.authenticate(email='example@example.org', password='my-password')
        
            # Alternatively, you may initialize the Transfluent client directly
            # with your authentication token.
            client = transfluent.Transfluent(token='my-token')
        
            # Order translations for a resource file.
            response = client.file_save(
                identifier='my-project/messages',
                language=1,
                file=open('translations/messages.pot'),
                type='po-file'
            )
            print "The file contains {0} words.".format(response['word_count'])
            response = client.file_translate(
                identifier='my-project/messages',
                language=1,
                target_languages=[11],
            )
            print "{0} words were ordered.".format(response['word_count'])
        
            # Check if the translation for the resource file is complete.
            is_translated = client.is_file_complete(
                identifier='my-project/messages',
                language=11
            )
        
            if is_translated:
                # Retrieve the translated resource file.
                content = client.file_read(
                    identifier='my-project/messages',
                    language=11
                )
                with open('translations/en/LC_MESSAGES/messages.po', 'w') as out:
                    out.write(content)
            else:
                # Check the precise translation progress for the resource file.
                status = client.file_status(
                    identifier='my-project/messages',
                    language=11
               )
               print "Translation is {0} complete.".format(status['progress'])
        
        Resources
        ---------
        
        - `Issue Tracker <http://github.com/jpvanhal/python-transfluent/issues>`_
        - `Code <http://github.com/jpvanhal/python-transfluent>`_
        - `Development Version
          <http://github.com/jpvanhal/python-transfluent/zipball/master#egg=transfluent-dev>`_
        
        Changelog
        ---------
        
        Here you can see the full list of changes between each Transfluent for Python
        release.
        
        0.1.0 (April 22, 2013)
        ^^^^^^^^^^^^^^^^^^^^^^
        
        - Initial public release.
        
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
