semvec/pypi-packages huggingface dataset:
Flask-Graphite 0.6.0
Push useful metrics for each request without effort!
License: MIT

.. image:: https://raw.githubusercontent.com/numberly/flask-graphite/master/artwork/flask-graphite.png

|

.. image:: https://img.shields.io/pypi/v/flask-graphite.svg
   :target: https://pypi.python.org/pypi/flask-graphite
.. image:: https://img.shields.io/github/license/numberly/flask-graphite.svg
   :target: https://github.com/numberly/flask-graphite/blob/master/LICENSE
.. image:: https://img.shields.io/travis/numberly/flask-graphite.svg
   :target: https://travis-ci.org/numberly/flask-graphite
.. image:: https://img.shields.io/coveralls/numberly/flask-graphite.svg
   :target: https://coveralls.io/github/numberly/flask-graphite
.. image:: https://readthedocs.org/projects/flask-graphite/badge/?version=latest
   :target: https://flask-graphite.readthedocs.io/en/latest/?badge=latest

|

Flask-Graphite grants you the power to push useful metrics for each request
without effort

Documentation: https://flask-graphite.readthedocs.io.


Features
========

* Send metrics to graphite for each request
* Metric name based on the route of the request
* Average processing time, number of requests, and stats about status code for
  each route


Example
=======

Here is a minimal template to use Flask-Graphite in a project.

.. code-block:: python

    from flask import Flask
    from flask_graphite import FlaskGraphite

    app = Flask(__name__)
    FlaskGraphite(app)

Such a simple snippet, combined with a Grafana dashboard, would give you
something like this:

.. image:: artwork/grafana_dashboard.png
   :alt: An example dashboard powered with Flask-Graphite
mPython-hcsr04 0.0.1
hcsr04 ultrasonic senser for mPython library
License: MIT

<img width="300" src="https://images-na.ssl-images-amazon.com/images/I/61-2fYKuyKL._SL1200_.jpg"/>


# HC-SR04 Sensor driver in micropython

Micropython driver for the well-known untrasonic sensor [HC-SR04](https://www.mpja.com/download/hc-sr04_ultrasonic_module_user_guidejohn.pdf)

The driver has been tested on Wemos D1 mini PRO, but It should work on whatever other micropython board, 
if anyone find problems in other boards, please open an issue and we'll see.

## Motivation

The existing drivers in micropython are a bit old and they don't use the relatively new method `machine.time_pulse_us()` which
Is more accurate that whatever other method using pure python, besides the code is compliant with "standard" micropython,
there is no code for specific boards.

Finally I've added a method, `distance_mm()` that don't use floating point operations, for environments where there is no
floating point capabilities.

## Examples of use:

### How to get the distance

The `distance_cm()` method returns a `float` with the distance measured by the sensor.

```python
from hcsr04 import HCSR04

sensor = HCSR04(trigger_pin=Pin.P0, echo_pin=Pin.P1)

distance = sensor.distance_cm()

print('Distance:', distance, 'cm')
```

There is another method, `distance_mm()`, that returns the distance in milimeters (`int` type) and **no floating point is used**, designed 
for environments that doesn't support floating point operations.

```python
distance = sensor.distance_mm()

print('Distance:', distance, 'mm')
```
The default timeout is based on the sensor limit (4m), but we can also define a different timeout, 
passing the new value in microseconds to the constructor.

```python
from hcsr04 import HCSR04

sensor = HCSR04(trigger_pin=16, echo_pin=0, echo_timeout_us=1000000)

distance = sensor.distance_cm()

print('Distance:', distance, 'cm')
```

### Error management

When the driver reaches the timeout while is listening the echo pin the error is converted to `OSError('Out of range')`

```python
from hcsr04 import HCSR04

sensor = HCSR04(trigger_pin=16, echo_pin=0, echo_timeout_us=10000)

try:
    distance = sensor.distance_cm()
    print('Distance:', distance, 'cm')
except OSError as ex:
    print('ERROR getting distance:', ex)

```
async-sqlalchemy 1.0.0
asyncio sqlalchemy support
License: MIT

# asyncnsq
[![Downloads](https://pepy.tech/badge/async-sqlalchemy)](https://pepy.tech/project/async-sqlalchemy)
[![PyPI version](https://badge.fury.io/py/async-sqlalchemy.svg)](https://badge.fury.io/py/async-sqlalchemy)

## asyncio sqlalchemy support,with async/await

add asyncio sqlalchemy support

## Install

--------------

pip install async-sqlalchemy

## Usage examples

--------------


```python
import asyncio
from sqlalchemy import Integer, Column, String, ForeignKey
from async_sqlalchemy.manager.async_pg import PostgresManager
from async_sqlalchemy.model.mixin import Mixin
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy.sql import select

dsn = "postgres://postgres:test@localhost:2345/test"

conf = {'dsn': dsn}

Base = declarative_base()


Manager = PostgresManager(conf=conf)


class User(Mixin, Base):

    _manager = Manager

    __tablename__ = 'test'
    id = Column(Integer, autoincrement=True,  primary_key=True)
    name = Column(String(50))

    def __repr__(self):
        return "<User(name='%s', id='%s')>" % (
            self.name, self.id)


class Parent(Mixin, Base):
    __tablename__ = 'parent'
    _manager = Manager
    id = Column(Integer, primary_key=True)
    child = relationship("Child", lazy='joined')


class Child(Mixin, Base):
    _manager = Manager
    __tablename__ = 'child'
    id = Column(Integer, primary_key=True)
    parent_id = Column(Integer, ForeignKey('parent.id'))
    parent = relationship("Parent", back_populates="child")


if __name__ == '__main__':

    loop = asyncio.get_event_loop()
    loop.run_until_complete(Manager.connect())

    result = loop.run_until_complete(Manager.get(
        User.objects([User.id]).join(
            Parent.__table__,
            Parent.id == User.id)))
    print(result)

    # result = loop.run_until_complete(Child.create_table())
    # print(result)
    # u = loop.run_until_complete(User.create(name='test'))
    # print('create', u)
    # print('get', loop.run_until_complete(User.get(name='test')))
    # print('all', loop.run_until_complete(User.all()))
    # u.name = 'aaa'
    # print('save', loop.run_until_complete(u.save()))

```

License
-------

The asyncnsq is offered under MIT license.
todoBot 0.2
Simple bot
License: MIT

# todoBot


Overview
========

todoBot is a task manager telegram bot. There are two types of tasks.
The first one will notify you every day until you delete it. The second
one is a timer with a start button. You create a bunch of tasks and then
press the start button after what the timer runs and notify you at a
certain time. Basically a multiple timer.

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

Required: python3, pip3, setuptools, config

```bash
clone https://github.com/lrusifikator/todoBot
cd todoBot
sudo apt install python3 python3-pip
pip3 install --pre --upgrade -r requires.txt
sudo python3 setup.py install
```
Or just: `sudo pip install todoBot`

Usage
=====

It is possible to use it only if you have a free server where you can
run it whole the time. It doesn't need much, a low-end PC would be more
than enough.

Creating a bot
--------------

1.  Search for the “botfather” telegram bot in the telegram search bar
    (he’s the one that’ll assist you with creating and managing your
    bot)
2.  Click on or type `/newbot` to create a new bot.

Setting up the todoBot
------------------------

3.  Botfather will send you a bot token. Copy it
4.  Type in the terminal `set-todoBot` and insert the token
5.  Type in the terminal `todoBot`

If you want it to run on a server using ssh, type in the ssh session:
`nohup todoBot &> /dev/null &` It'ill make able to keep the bot
running after living the ssh session, delete all the output and hide the
process

Contact information
===================

<yakushev.rusl101@gmail.com>