semvec/pypi-packages huggingface dataset:
littlebird 0.0.0a1
Asyncronous twitter client library
License: MIT

littlebird
==========

LittleBird is a Python 3.6+ asynchronous library for accessing twitter utilizing new python features: async generators, type hinting, etc.

Usage
-----

Currently only the oauth1 methods are supported (application only authentication, user account access).

.. code:: python

    import asyncio
    import contextlib

    from littlebird import LittleBird
    from littlebird.web import OAuth1HttpClient

    little_bird = LittleBird(OAuth1HttpClient(
        # required for oauth1 signing:
        consumer_key: str,
        consumer_secret: str,
        # optionally necessary for endpoints requiring a user's scope:
        access_token: Optional[str] = None,
        access_token_secret: Optional[str] = None
    ))

    async def main(little_bird):
        # watch the random sampling of tweets chosen by twitter
        async for tweet in little_bird.sample():
            print(tweet)

    if __name__ == '__main__':
        loop = asyncio.get_event_loop()
        with contextlib.suppress(KeyboardInterrupt):
            loop.run_until_complete(main(little_bird))
neojsonrpc 0.1.1
A Python JSON-RPC client for the NEO blockchain.
License: MIT
Keywords: neo blockchain json-rpc json-rpc-client api

NeoJsonRPC
##########

**NeoJsonRPC** is a Python JSON-RPC client for the NEO blockchain. It implements the JSON-RPC
methods of the API interface provided by NEO nodes (minus the methods requiring an opened wallet).
The client also provides a high-level interface to invoke contract methods on the NEO blockchain.

.. contents:: Table of Contents
    :local:

Documentation
=============

Online browsable documentation is available at https://neojsonrpc.readthedocs.io.

Requirements
============

Python_ 3.4+, Requests_ 2.0+.

Installation
============

To install NeoJsonRPC, please use pip_ (or pipenv_) as follows:

.. code-block:: shell

    $ pip install neojsonrpc

Basic usage
===========

The first step to interact with the NEO JSON-RPC interface is to initialize a ``neojsonrpc.Client``
instance. The following examples respectively show how to get clients for the TestNet, the MainNet
and an hypothetical local PrivNet:

.. code-block:: python

    >>> from neojsonrpc import Client
    >>> testnet_client = Client.for_testnet()
    >>> mainnet_client = Client.for_mainnet()
    >>> privnet_client = Client(host='localhost', port='30333')

Then you can easily call some of the `JSON-RPC methods <http://docs.neo.org/en-us/node/api.html>`_
provided by NEO nodes. Here are some examples:

.. code-block:: python

    >>> from neojsonrpc import Client
    >>> client = Client.for_testnet()
    >>> client.get_block_count()
    973369
    >>> client.get_contract_state('2c0fdfa9592814b0a938219e218e3a6b08615acd')
    {'author': 'foobar',
     'code_version': '0.3',
    # [...]
    }

You can also invoke smart contract functions using the following methods:

.. code-block:: python

    >>> from neojsonrpc import Client
    >>> client = Client.for_testnet()
    >>> result = client.invoke_function('34af1b6634fcd7cfcff0158965b18601d3837e32', 'symbol', [])
    {'gas_consumed': '0.217',
     'stack': [{'type': 'ByteArray', 'value': bytearray(b'TKN')}],
     'state': 'HALT, BREAK'}
    >>> # Another convenient way to do the same operation is as follows:
    >>> client.contract('34af1b6634fcd7cfcff0158965b18601d3837e32').symbol()
    {'gas_consumed': '0.217',
     'stack': [{'type': 'ByteArray', 'value': bytearray(b'TKN')}],
     'state': 'HALT, BREAK'}

Authors
=======

Morgan Aubert (`@ellmetha <https://github.com/ellmetha>`_) and contributors_. See ``AUTHORS`` for
more details.

.. _contributors: https://github.com/ellmetha/neojsonrpc/contributors

License
=======

MIT. See ``LICENSE`` for more details.


.. _pip: https://github.com/pypa/pip
.. _pipenv: https://github.com/pypa/pipenv
.. _Python: https://www.python.org/
.. _Requests: http://docs.python-requests.org/en/master/
pytest-pypi 0.1.1
Easily test your HTTP library against a local copy of pypi
License: MIT
Keywords: pytest-pypi testing pytest pypi

pytest-httpbin
==============

httpbin is an amazing web service for testing HTTP libraries. It has several
great endpoints that can test pretty much everything you need in a HTTP
library. The only problem is: maybe you don't want to wait for your tests to
travel across the Internet and back to make assertions against a remote web
service.

Enter pytest-httpbin. Pytest-httpbin creates a pytest "fixture" that is
dependency-injected into your tests. It automatically starts up a HTTP server
in a separate thread running httpbin and provides your test with the URL in the
fixture. Check out this example:

.. code-block:: python

    def test_that_my_library_works_kinda_ok(httpbin):
        assert requests.get(httpbin.url + '/get/').status_code == 200

This replaces a test that might have looked like this before:

.. code-block:: python

    def test_that_my_library_works_kinda_ok():
        assert requests.get('http://httpbin.org/get').status_code == 200

pytest-httpbin also supports https and includes its own CA cert you can use.
Check out `the full documentation`_ on the github page.

.. _the full documentation: https://github.com/kevin1024/pytest-httpbin
doclink 1.1.0
Create HTTP client from pydoc
License: MIT


*******
Doclink
*******

.. image:: https://travis-ci.org/Luoyufu/doclink.svg?branch=master
    :target: https://travis-ci.org/Luoyufu/doclink

.. image:: https://codecov.io/gh/Luoyufu/doclink/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/Luoyufu/doclink

.. image:: https://img.shields.io/pypi/v/doclink.svg
  :target: https://pypi.python.org/pypi/doclink

.. image:: https://img.shields.io/pypi/pyversions/doclink.svg
  :target: https://pypi.python.org/pypi/doclink

| Build client for Web APIs from pydoc. Inspired by `Uplink <https://github.com/prkumar/uplink>`_.

Overview
========
| Doclink turns a Python function into HTTP API by writting pydoc to declare the api meta.
| It is based on Requests and uses YAML with predefined schema as api declaration.
| When calling the function, response from HTTP API will be passed in as a parameter for futher handling.

Features
========
* create python function as HTTP API with **pydoc**
* **YAML** based schema for api declaration
* handle api response in the **same** function
* response hook as **middleware**
* **all** args for Requests supported
* select base_uri dynamicly from simple **router**

Quick through, with httpbin
=====
Create a consumer instance.

.. code-block:: python

    from doclink import Consumer

    consumer = Consumer('http://httpbin.org/')

Add response hook(middleware).

.. code-block:: python

    @consumer.resp_hook
    def json_hook(resp):
        resp.json = resp.json()

Add function for api declaration.

.. code-block:: python

        @consumer.get('get')
        def get(resp):
            """
            <meta>
                args:
                    query:
                        - arg1: arg1
                        - arg2: arg2
            </meta>
            """
            return resp.json['args']

Use you api.

.. code-block:: python

    >>> get()
    {
        "arg1": "arg1",
        "arg2": "arg2"
    }