semvec/pypi-packages huggingface dataset:
markup.py 1.12
An HTML/XML generator
License: MIT

This is markup.py - a Python module that attempts to make it easier to generate HTML/XML from a Python program in an intuitive, lightweight, customizable and pythonic way. It works with both python 2 and 3.

The code is in the public domain.

Version: 1.12 as of July 12 2017.

Please send bug reports, feature requests, enhancement ideas or questions to nogradi at gmail dot com.

Installation: Run 'pip install markup.py" from the terminal.

Documentation and further info is at http://markup.sourceforge.net/
falcon-stats 0.5
A simple middleware to gather request-response statistics from the falcon REST framework
License: MIT
Keywords: falcon falconframework rest-api statistics middleware

# Falcon Stats
`falcon-stats` is a simple usage statistics middleware for the [Falcon REST framework](https://falconframework.org/). It should primarily enable later analysis that separately gets relevant data from the DB.

## Data Collection
*Falcon Stats* gathers data on incoming requests and their processed responses. Currently the following features are saved:

- Response Timestamp
- Processing Time between Request and Response
- Request Method
- User Agent
- Request URI (domain, endpoint and query string)
- Remote IP (closest to the server)
- Request Content-Type
- Response Status
- Request Content Length

Note that logging and database access add overhead to the processing time. Furthermore it will add a few milliseconds on every response.

## Installation
... is as easy as

```
pip install falcon-stats
```

Installation assumes you have the packages found in *requirements.txt* installed. Please note the development build of SQLAlchemy that is pulled from the official git repository.

## Usage
In your main falcon file import the `FalconStatsMiddleware` and add it to the middleware list of your API instance. That's it.

```python
from falconstats import FalconStatsMiddleware
...
fsm = FalconStatsMiddleware(
	db_user="root",
	db_pass="my-secret-pw",
	db_addr="localhost:3306",
	db_name="stats"
)
app = falcon.API(middleware=[fsm])
```

This will connect to the given MySQL database and start to add request-response data. For now only MySQL is supported - *PRs welcome*!

## Compatibility
The middleware is used with Python 3.5 and 3.6. I don't plan on supporting Python 2.7 but it still might work.
slick-bitcoinrpc 0.1.4
Just another Python bitcoin-rpc client
License: MIT
Keywords: bitcoin

================
slick-bitcoinrpc
================

Just another Python bitcoin-rpc client.
Built as faster alternative to python-bitcoinlib rpc (https://github.com/petertodd/python-bitcoinlib) and python-bitcoinrpc (https://github.com/jgarzik/python-bitcoinrpc) using pycurl and ujson.

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

    pip install slick-bitcoinrpc

Example
=======
.. code:: python

    from slickrpc import Proxy

    bitcoin = Proxy("http://%s:%s@127.0.0.1:8332"%(rpcuser, rpcpassword))
    print(bitcoin.getblock(bitcoin.getbestblockhash()))


Performance Comparison
======================

Method
------
Here's bash script able to measure performance of such bitcoin rpc clients

.. code:: bash
   
    RPC_URL='http://username:password@127.0.0.1:8332'
    TASKS=(
      "p.getinfo()"
      "p.getblock(p.getbestblockhash())"
      "map(lambda tx: p.getrawtransaction(tx['txid'], 1), p.listtransactions())"
    )
    SETUPS=(
      "from slickrpc import Proxy; p = Proxy(service_url='$RPC_URL');"
      "from bitcoinrpc.authproxy import AuthServiceProxy; p = AuthServiceProxy(service_url='$RPC_URL');"
      "from bitcoin.rpc import Proxy; p = Proxy(service_url='$RPC_URL');"
    )
    for TASK in "${TASKS[@]}"
    do
      for SETUP in "${SETUPS[@]}"
      do
        python -m timeit -s "$SETUP" -n 1000 "$TASK"
      done
    done


Results
-------

Values are best of 3, msec per loop


+------------+-----------+----------------------------------+--------------------------------------+
|            | getinfo() | p.getblock(p.getbestblockhash()) | map(lambda tx: p.getrawtransaction(  |
|            |           |                                  | tx['txid'], 1), p.listtransactions() |
+============+===========+==================================+======================================+
| slick-     | 1.01 msec | 1.17 msec                        | 27.7 msec                            |
| bitcoinrpc |           |                                  |                                      |
+------------+-----------+----------------------------------+--------------------------------------+
| python-    | 2.53 msec | 3.89 msec                        | 41.9 msec                            |
| bitcoinrpc |           |                                  |                                      |
+------------+-----------+----------------------------------+--------------------------------------+
| python-    | 2.76 msec | DeserializationExtraDataError    | AttributeError                       |
| bitcoinlib |           |                                  |                                      |
+------------+-----------+----------------------------------+--------------------------------------+
django-activecollab-digger 0.7.2
Django ActiveCollab application
License: MIT
Keywords: django activecollab

ActiveCollab Digger
===================

Django application to integrate ActiveCollab issue reporting into Django based projects.

To use:

#. ``pip install django-activecollab-digger``
#. add ``activecollab_digger`` to ``INSTALLED_APPS``
#. add ``url(r'^digger/', include('activecollab_digger.urls'))`` to ``urls.py``
#. add the settings::

    # ActiveCollab API URL
    AC_BASE_URL = 'https://app.activecollab.com/COMPANY_ID'
    AC_API_URL = AC_BASE_URL + '/api/v1/'
    # ActiveCollab API token
    AC_TOKEN = ''
    # ActiveCollab project ID
    AC_PROJECT_ID = 1
    # ActiveCollab user ID to create the issues
    AC_USER = 1
#. in settings add the context processor ``activecollab_digger.context_processors.activecollab_digger`` to ``TEMPLATES['OPTIONS']['context_processors']``


Notes
-----

* The application needs to be behind authentication, having a ``LOGIN_URL`` setting should be enough in cases where the django admin is enable
* In Python version lower than 2.7.9 ``pip install`` may not install all the dependencies, this is due to an issue with ``setuptools``. To work around it install/update the packages ``appdirs packaging setuptools six``.