semvec/pypi-packages huggingface dataset:
htmlatex 0.1.0
Like HTML, but not LaTeX? HtmLaTeX compiles HTML code to LaTeX.
License: MIT
Requires Python: >=3.8,<4.0

# HtmLaTeX

*Work in Progress*

Like HTML, but not LaTeX? HtmLaTeX compiles HTML code to LaTeX.

For example, the following HTML code:

```html
<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>My Paper</title>
    <meta name="date" content="2022-09-02">
    <meta name="author" content="Linus">
    <link rel="icon" type="image/png" href="logo.png">
</head>
<body>
<div>
    <a href="#">link</a>
</div>
<h1 id="section-1">Hello World</h1>
<p>This is a paragraph.</p>

<img src="a">

</body>
</html>
```

...compiles to the following LaTeX code:

```latex
%%%%%% HEAD START %%%%%%

	\title{My Paper}

	\date{2022-09-02}

	\author{Linus}

%%%%%% HEAD END %%%%%%

%%%%%% MAIN DOCUMENT START %%%%%%
\begin{document}
\maketitle

	\section{Hello World}
	\label{section-1}

	This is a paragraph.

	\includegraphics{a}

\end{document}
%%%%%% MAIN DOCUMENT END %%%%%%
```

## Installation

```bash
$ pip install HtmLaTeX
```

## Usage

### As binary

```bash
$ python3 -m htmlatex paper.html
```

This will create a file called `paper.tex` in the current directory.

### As library

```python
import io
import bs4
from htmlatex import Handlers, htmlatex

# Declare handlers for HTML tags

# Collection of handlers for HTML tags
handlers = Handlers()


# Register a handler for the <h1> tag
@handlers.register()
def h1(node: bs4.element.Tag):
    section_name = node.string
    section_id = node.attrs['id']
    yield [
        r"\section{%s}" % section_name,
        r"\label{%s}" % section_id,
    ]


# ... more handlers ...

# Destination for generated LaTeX
generated_latex = io.StringIO()
# HTML to be converted
html = "..."
# And compile
htmlatex(html, generated_latex, handlers=handlers)
```
mpylogs 0.1.0
Python library for logging with colors and http status code.
License: MIT
Requires Python: >=3.10
Keywords: logs logging logger

# **mPyLogs**

## Install
___
```bash
$ pip install mpylogs
```

## Configure
___

```python
# main.py

from mpylogs.functions import PyLogger

logger = PyLogger(appname="myapp") 
logger.http(message="Uma mensagem http qualquer", status_code=200, data={"name": "Um nome qualquer", "age": 22})
```

> 2022-09-02 14:05:59 | [HTTP   ] | Uma mensagem http qualquer | [STATUSCODE 200] | {'name': 'Um nome qualquer', 'age': 22}


## Log Types
___

| Tipo      | Description                                                        |
|-----------|--------------------------------------------------------------------|
| `error`   | Informar sobre exceptions tratadas                                 |
| `warning` | Informar eventos ou estados potencialmente prejudicias ao programa |
| `debug`   | Acompanhar eventos ou estados do programa                          |
| `info`    | Descrever infos detalhadas sobre o estado do programa              |
| `http`    | Informar dados de requests e responses feitas via http             |


## Middlewares
___

### django
```python
# httpLogger.py

from mpylogs.functions import PyLogger
from django.utils.deprecation import MiddlewareMixin


class HTTPLoggerMiddleware(MiddlewareMixin):

    def process_response(self, request, response):
        logger = PyLogger(appname="myDjangoApp")
        logger.http(f'{request.META.get("REMOTE_ADDR")} {request.method} {request.META.get("PATH_INFO")}', {"status": response.status_code})

        return response

```

```python
# setting.py

MIDDLEWARE = [
    ...,
    'app.utils.httpLogger.HTTPLoggerMiddleware' # path to your middleware file
]

```

### Flask

```python

# Your app setup file
from flask import Flask, request, Response
from mpylogs.functions import PyLogger

app = Flask(__name__)
logger = PyLogger(appname="MyFlaskApp")

@app.after_request
def log_response(response: Response):
    logger.http(f'{request.remote_addr} {request.method} {request.path}', {
                "status": response.status_code})
    return response

```
im-openapi-validator 1.0.1
The IM OpenAPI Validator
License: MIT
Keywords: configuration

Informatics Matters OpenAPI Validator (oval)
============================================

.. image:: https://badge.fury.io/py/im-openapi-validator.svg
   :target: https://badge.fury.io/py/im-openapi-validator
   :alt: PyPI package (latest)

.. image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
   :target: https://github.com/pre-commit/pre-commit
   :alt: pre-commit

A utility designed as a `pre-commit`_ OpenAPI file validator::

    oval --help

Use it by adding it to your repository's ``.pre-commit-config.yaml`` file::

    # Basic OpenAPI Validator
    - repo: https://github.com/informaticsmatters/openapi-validator
      rev: '1.0.0'
      hooks:
      - id: im-oval
        files: app/openapi/openapi.yaml

.. _pre-commit: https://pre-commit.com

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

The OpenAPI validator is published on `PyPI`_ and can be installed from there::

    pip install im-openapi-validator

This is a Python 3 utility, so try to run it from a recent (ideally 3.10)
Python environment.

.. _PyPI: https://pypi.org/project/im-openapi-validator/

Get in touch
------------

- Report bugs, suggest features or view the source code `on GitHub`_.

.. _on GitHub: https://github.com/informaticsmatters/openapi-validator
golfer-py 0.2.1
Tool to shorten Python code
License: MIT
Requires Python: >=3.10

Pythonコードをなるべく短縮します。

可読性は一切失われます。計算量をオーダーレベルで悪化させることはありませんが、誤差レベルで遅くなるかもしれません。

インストール
```commandline
pip install golfer-py
```