semvec/pypi-packages huggingface dataset:
Flask-Logify 2.4.5
Logging configuration for flask application
License: MIT

Flask-Logify
==============

|version|

Advanced Logging configuration for flask application based on yaml or json file.
See `logging.config <https://docs.python.org/3/library/logging.config.html>`__

NOTE: If you want to use ``flask_logify.handlers.FlaskSysLogHandler``
you must init this extension with an app context.

The dump of request or response are made by builders, there are two concrete implementations:

  1. ``LogTextBuilder``: message as plain text (configurable).
  2. ``LogJSONBuilder``: message as json format.

You can create your own builder by extending class ``LogBuilder``. In order to get the correct remote address
you can override ``LogBuilder.get_remote_address`` method or you can inject a function in ``LogBuilder`` constructor.

See example usage in `example/test.py <./flask_logify/example/test.py>`__.

``FlaskLogging`` as a decorator attribute with which you can disable log messages for a specific route,
passing a logging filter to it. For example you want disable log for health check endpoint.
See `example/text.py <./flask_logify/example/test.py>`__.


Quickstart
~~~~~~~~~~

Install ``flask_logify`` using ``pip``:

::

   $ pip install Flask-Logify

.. _section-1:

Example usage
^^^^^^^^^^^^^

An example of log file configuration is under example folder.

Only yaml or json format are supported.

.. code:: python

    from flask import Flask
    from flask_logify import FlaskLogging


    app = Flask(__name__)
    app.config['LOG_FILE_CONF'] = 'log.yaml'
    app.config['LOG_LOGGER_NAME'] = 'flask-development'

    logging = FlaskLogging()
    with app.app_context():
        logging.init_app(app)

    app.run()

Go to http://127.0.0.1:5000/ and see log messages like configured

.. _section-2:

Configuration
^^^^^^^^^^^^^
Base configuration keys:

  1. ``LOGGING``: *(default: None)* dict logging configuration
  2. ``LOG_FILE_CONF``: *(default: None)* absolute path of configuration file (has priority on LOGGING)
  3. ``LOG_APP_NAME``: *(default: flask)* the ident of the record used by syslog
  4. ``LOG_LOGGER_NAME``: *(default: flask-development)* usually is {LOG_APP_NAME}-{FLASK_ENV}
  5. ``REQUEST_ID_HEADER``: *(default: X-Request-ID)* request id header key
  6. ``LOG_BUILDER``: *(default: text)* log builder implementation (text, json)

Text and JSON builder configuration keys:

  1. ``LOG_REQ_HEADERS``: *(default: [])* request headers to dump always
  2. ``LOG_RESP_HEADERS``: *(default: [])* response headers to dump always
  3. ``LOG_REQ_SKIP_DUMP``: *(default: not DEBUG)* if true dump of request body and headers are skipped
  4. ``LOG_RESP_SKIP_DUMP``: *(default: DEBUG)* if true dump of response body and headers are skipped

Text builder only:

  1. ``LOG_RESP_FORMAT``: *(default: "OUTGOING RESPONSE for {address} at {path}: {level} STATUS {status}{headers}{body}")*
     log message format for response
  2. ``LOG_REQ_FORMAT``: *(default: "INCOMING REQUEST: {address} {method} {scheme} {path}{headers}{body}")*
     log message format for request


License MIT

.. |version| image:: https://pypip.in/version/flask_logify/badge.png
yahoostock 1.3.1
A package designed to scrape data from Yahoo Finance.
License: MIT
Requires Python: >=3.7

![Version](https://img.shields.io/pypi/v/yahoostock?color=g)
![Package Size](https://img.shields.io/github/repo-size/rohan0x/yahoostock)
![Last Commit](https://img.shields.io/github/last-commit/rohan0x/yahoostock)
![Release Date](https://img.shields.io/github/release-date-pre/rohan0x/yahoostock)
![License](https://img.shields.io/pypi/l/yahoostock)

# yahoostock
 A package designed to scrape data from Yahoo Finance.

## Installation
The most simple installation method is through PIP.
```
pip install yahoostock
```
The PyPI page can be found [here](https://pypi.org/project/yahoostock/).

## Usage
Use the following code to see a list of useful methods.
```py
from yahoostock import yahoo
print(dir(yahoo))
```
Note that each method accepts a stock ticker as a single parameter and returns a float with the specified statistic.

Here's an example:
```py
from yahoostock.yahoo import *

stock_name = "GOOGL"

function_list = [
    get_price,
    get_open,
    get_previous_close,
    get_change,
    get_percent_change
]

for function in function_list:
    # prints price ($), opening price ($), last closing price ($),
    # change in price ($), and relative change (%)
    print(function(stock_name))
```

For information about a specific method's purpose refer to the respective method's docstrings.

For example:
```py
from yahoostock.yahoo import get_price

help(get_price)
```
pel 0.0.1
The most elegant build system.
License: MIT
Requires Python: >=3.8,<3.11

# Pel is the most elegant build system
## Introduction

Pel is an easy-to-use build system/task runner written in Python. It is designed to be more advanced than task runners like [Make](https://www.gnu.org/software/make/) or [Invoke](https://www.pyinvoke.org/), but much simpler than complex build systems like [CMake](https://cmake.org/) or [Bazel](https://bazel.build/).

## Installation

### Installation from pip

```
pip3 install --user pel
```

It is safe to install Pel as a global Python package. **Installing Pel will never modify any other Python packages on your computer.**

## Development status

Pel is still in the early stages of development. It is not currently ready for production use.

## Features

### Cross-platform support

Pel is written in pure Python, and is intended to work on any operating system supported by Python, such as:
* Linux
* Windows
* macOS
* FreeBSD

## Why we made Pel

Most build systems are either **too simple** or **too complex**.

 * A **simple** build system, like [Make](https://www.gnu.org/software/make/) or [Invoke](https://www.pyinvoke.org/) makes it easy to run arbitrary shell commands, but makes it hard to add non-trivial dependency management and build caching
 * A **complex** build system, like [CMake](https://cmake.org/) or [Bazel](https://bazel.build/), offers sophisticated dependency management and build caching, but only for predefined types of build targets. These build systems are excellent choices for building a large C++ monorepo, but can be unwieldy to integrate with arbitrary commands and obscure build tools.

Pel is designed to be the happy medium between simple and complex.
pyfract 1.4.1
Fractions implementation for Python
License: MIT
Keywords: math,fractions,fract,numerator,denominator

# PyFract
A simple implementation of fraction numbers in Python. In some cases it is better than default Python library for fractions.

## Instalation
```
pip install pyfract
```

## Running tests
```
chmod +x run-tests.sh
./run-tests.sh
```

## Usage
### Initialization
```python
from pyfract.fraction import Fraction

f = Fraction(1, 2)
print(f) # [1/2]

f = Fraction(numerator=1, denominator=2)
print(f) # [1/2]
```

### Mathematical operations
You can use all of the math operations with other fraction, int or float as shown in the example below
```python
from pyfract.fraction import Fraction

f1 = Fraction(1, 2)
f2 = Fraction(1, 4)

print(f1 + f2) # [3/4]
print(f1 - f2) # [1/4]
print(f1 * f2) # [1/8]
print(f1 / f2) # [2/1]

print(f1 + 2) # [5/2]
print(f1 - 2) # [-3/2]
print(f1 * 2) # [1/1]
print(f1 / 2) # [1/4]
```

### Comparisons
You can compare fractions using operators like greater than, less than and so on...
```python
from pyfract.fraction import Fraction

f1 = Fraction(1, 2)
f2 = Fraction(1, 4)

print(f1 < f2) # False
print(f1 <= f2) # False
print(f1 > f2) # True
print(f1 >= f2) # True
print(f1 == f2) # False
print(f1 != f2) # True

print(f1 < 0.5) # False
print(f1 <= 0.5) # True
print(f1 > 0.5) # False
print(f1 >= 0.5) # True
print(f1 == 0.5) # True
print(f1 != 0.5) # False
```

### Conversion from float
```python
from pyfract.fraction import Fraction

print(Fraction.from_float(0.5)) # [1/2]
print(Fraction.from_float(0.134)) # [67/500]
```

### Accurate conversion from float
Fast conversion from float doesn't work so well for float like `0.333333333333333333`. This method is much slower, but allows to convert floats more accurately
```python
from pyfract.fraction import Fraction

x = 1 / 3
print(x) # 0.3333333333333333
f = Fraction.from_float_accurately(x)
print(f) # [1/3]
```
`accuracy` defines up to how many decimal places the fraction must be accurate. By default it is `8`
```python
from pyfract.fraction import Fraction

f = Fraction.from_float_accurately(0.31987398749812214, accuracy=10)
print(f) # [44981/140621]
```
### To float
```python
from pyfract.fraction import Fraction

f = Fraction(1, 2)
print(f.to_float()) # 0.5
```

## Contributing
Make a fork of this repository, clone codebase, create new branch, make your changes, commit it, push to remote, create pull request to this repository. Any contribution highly appreciated
pytest-doctest-ufunc 0.1.4
A plugin to run doctests in docstrings of Numpy ufuncs
License: MIT
Requires Python: >=3.6

This project is no longer maintained. Its functionality has been incorporated
into `pytest-doctestplus <https://github.com/astropy/pytest-doctestplus>`_.

====================
pytest-doctest-ufunc
====================

.. image:: https://img.shields.io/pypi/v/pytest-doctest-ufunc.svg
    :target: https://pypi.org/project/pytest-doctest-ufunc
    :alt: PyPI version

.. image:: https://img.shields.io/pypi/pyversions/pytest-doctest-ufunc.svg
    :target: https://pypi.org/project/pytest-doctest-ufunc
    :alt: Python versions

.. image:: https://travis-ci.org/lpsinger/pytest-doctest-ufunc.svg?branch=master
    :target: https://travis-ci.org/lpsinger/pytest-doctest-ufunc
    :alt: See Build Status on Travis CI

.. image:: https://ci.appveyor.com/api/projects/status/github/lpsinger/pytest-doctest-ufunc?branch=master
    :target: https://ci.appveyor.com/project/lpsinger/pytest-doctest-ufunc/branch/master
    :alt: See Build Status on AppVeyor

A plugin to run doctests defined in docstrings of Numpy ufuncs

----

This `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `cookiecutter-pytest-plugin`_ template.


Installation
------------

You can install "pytest-doctest-ufunc" via `pip`_ from `PyPI`_::

    $ pip install pytest-doctest-ufunc


Contributing
------------
Contributions are very welcome. Tests can be run with `tox`_, please ensure
the coverage at least stays the same before you submit a pull request.

License
-------

Distributed under the terms of the `MIT`_ license, "pytest-doctest-ufunc" is free and open source software


Issues
------

If you encounter any problems, please `file an issue`_ along with a detailed description.

.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin
.. _`file an issue`: https://github.com/lpsinger/pytest-doctest-ufunc/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.org/project/pip/
.. _`PyPI`: https://pypi.org/project