Metadata-Version: 1.1
Name: pydiscourse
Version: 0.4.0
Summary: A Python library for the Discourse API
Home-page: https://github.com/bennylope/pydiscourse
Author: Marc Sibson and contributors
Author-email: ben+pydiscourse@benlopatin.com
License: BSD
Description: ===========
        pydiscourse
        ===========
        
        .. image:: https://secure.travis-ci.org/bennylope/pydiscourse.svg?branch=master
            :alt: Build Status
            :target: http://travis-ci.org/bennylope/pydiscourse
        
        A Python library for working with Discourse.
        
        This is a fork of the original Tindie version. It was forked to include fixes,
        additional functionality, and to distribute a package on PyPI.
        
        Goals
        =====
        
        * Exceptional documentation
        * Support all supported Python versions
        * Provide functional parity with the Discourse API, for the currently supported
          version of Discourse (something of a moving target)
        
        The order here is important. The Discourse API is itself poorly documented so
        the level of documentation in the Python client is critical.
        
        Installation
        ============
        
        ::
        
            pip install pydiscourse
        
        Examples
        ========
        
        Create a client connection to a Discourse server::
        
            from pydiscourse import DiscourseClient
            client = DiscourseClient(
                    'http://example.com',
                    api_username='username',
                    api_key='areallylongstringfromdiscourse')
        
        Get info about a user::
        
            user = client.user('eviltrout')
            print user
        
            user_topics = client.topics_by('johnsmith')
            print user_topics
        
        Create a new user::
        
            user = client.create_user('The Black Knight', 'blacknight', 'knight@python.org', 'justafleshwound')
        
        Implement SSO for Discourse with your Python server::
        
            @login_required
            def discourse_sso_view(request):
                payload = request.GET.get('sso')
                signature = request.GET.get('sig')
                nonce = sso_validate(payload, signature, SECRET)
                url = sso_redirect_url(nonce, SECRET, request.user.email, request.user.id, request.user.username)
                return redirect('http://discuss.example.com' + url)
        
        Command line
        ============
        
        To help experiment with the Discourse API, pydiscourse provides a simple command line client::
        
            export DISCOURSE_API_KEY=your_master_key
            pydiscoursecli --host-http://yourhost --api-user-system latest_topics
            pydiscoursecli --host-http://yourhost --api-user-system topics_by johnsmith
            pydiscoursecli --host-http://yourhost --api-user-system user eviltrout
        
        
        
        
        Release history
        ===============
        
        0.4.0
        -----
        
        * Adds initial groups functionality
        
        0.3.2
        -----
        
        * SSO functionality fixes
        
        0.3.1
        -----
        
        * Fix how empty responses are handled
        
        0.3.0
        -----
        
        * Added method to unsuspend suspended user
        
        0.2.0
        -----
        
        * Inital fork, including gberaudo's changes
        * Packaging cleanup, dropping Python 2.6 support and adding Python 3.5, PyPy,
          PyPy3
        * Packaging on PyPI
        
        0.1.0.dev
        ---------
        
        All pre-PyPI development
        
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: PyPy
