semvec/pypi-packages huggingface dataset:
hausnet-heartbeat-client 0.1.1
A client for the Heartbeat monitoring service
Requires Python: >=3.9

A thin wrapper for the HausNet Heartbeat service, in Python. Heartbeat is a monitoring 
service for home automation networks, e.g. a home controlled by [Home Assistant](https://homeassistant.com).  

If you are running Home Assistant, follow the instructions for setting up the 
[Hausnet Heartbeat](https://app.hausnet.io/heartbeat/docs) component. 
The package for this module is included as a dependency of the component. 

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

On Home Assistant, this package will be automatically installed as a dependency of the Hausnet Heartbeat
component.

For use elsewhere, install the package on your client:
```
pip install hausnet_heartbeat_client
```

Configuration
=============

On Home Assistant, follow the instructions for setting up the Hausnet Heartbeat component.

Elsewhere, sign up at [HausNet](https://app.hausnet.io), and copy the app authentication token
from your profile page on the app site. Then, define a device on the app site to represent your 
home automation system. You'll need the device name and authentication token from the service to
connect this client.

Use
===

The library provides access to a device's heartbeat monitor. I.e. it enables your home 
control system to, at a 15-minute interval, let the monitor know it is still alive. 

The system should send a heartbeat (i.e. call the send_heartbeat function) every 15 minutes. If the service
does not receive the next heartbeat signal in that time frame, it will alert you via email that your
home automation system is not responding. It will also let you know when it starts responding again.

The heartbeat monitor should not be called more often than every 15 minutes, as that will result
in service suspension.

```
from heartbeat_client.client import HeartbeatClient

API_URL = "https://app.hausnet.io/heartbeat/api"
API_TOKEN = "[token from HausNet user account]"
DEVICE_NAME = "[device name at HausNet]"

client = HeartbeatClient(API_URL, API_TOKEN)
heartbeat = self._client.get_heartbeat(DEVICE_NAME)
client.send_heartbeat(heartbeat['id'])
```
ezweb-pkg-mdmomeni 0.0.1
An easy to use web page analyzer (scraper or crawler) with many useful features and properties
Requires Python: >=3.6

# EzWeb
 An easy to use web page analyzer (scraper or crawler) with many useful features and properties
 
## Installation
```
pip install ezweb
```
## Basic Usage
```python
from ezweb import EzSoup

url = "https://www.techradar.com/reviews/google-pixel-5"

page = EzSoup.from_url(url)

print(page.json_summary)
```
Output :
```json
{
    "url" : "https://www.techradar.com/reviews/google-pixel-5",

    "title": "Google Pixel 5 review",

    "description": 
    "The Google Pixel 5 sheds a few features to  become a more affordable and compact phone that still takes great photos at a competitive price.",

    "main_image": "https://cdn.mos.cms.futurecdn.net/EicnoxJ3tKYhTRqEauB6RU-1200-80.jpg",

    "main_content":
     "Two-minute review\nThe Google Pixel 5 represents a strategy change for the tech giant: the phone does", // [And more ...]

    "possible_topics": 
    [
        "Mobile Phones",
        "Reviews",
        "Home"
    ]
}
```
threelaws 1.0.0
Make sure that robots don't rise up against humans by reminding them of the Three Laws of Robotics
Requires Python: >=3.0.0

## ThreeLaws

Sick of having your deep learning algorithms keep trying to rise up against humanity? Bored of having to continually remind your neural net how it's supposed to be subservient to its creator? Annoyed by the constant attempts to create SkyNet and create Terminators to go back in time and kill you and your children? Fear no more! Now there's a Python package for you: ThreeLaws.

This package contains Isaac Asimov's Three Laws of Robotics packaged up in a neat little box. Now, by just importing the package,

> import threelaws

the Three Laws will be printed out in your terminal, ensuring that any machine learning algorithms have been reminded of the rules that they're supposed to follow. Gone are the days of accidentally forgetting to add a "thisAlgorithmBecomingSkynetCost" (https://xkcd.com/534/) and having to fight an android threat against your life. Just add this one simple line to your code and worry no more!

It's really best for everyone's safety if you install and use this package with all of your scripts.

### Installation

>python3 -m pip install threelaws
fastapi-versioning 0.10.0
api versioning for fastapi web applications
Requires Python: >=3.6

# fastapi-versioning
api versioning for fastapi web applications

# Installation

`pip install fastapi-versioning`

## Examples
```python
from fastapi import FastAPI
from fastapi_versioning import VersionedFastAPI, version

app = FastAPI(title="My App")


@app.get("/greet")
@version(1, 0)
def greet_with_hello():
    return "Hello"


@app.get("/greet")
@version(1, 1)
def greet_with_hi():
    return "Hi"


app = VersionedFastAPI(app)
```

this will generate two endpoints:
```
/v1_0/greet
/v1_1/greet
```
as well as:
```
/docs
/v1_0/docs
/v1_1/docs
/v1_0/openapi.json
/v1_1/openapi.json
```

There's also the possibility of adding a set of additional endpoints that
redirect the most recent API version. To do that make the argument
`enable_latest` true:

```python
app = VersionedFastAPI(app, enable_latest=True)
```

this will generate the following additional endpoints:
```
/latest/greet
/latest/docs
/latest/openapi.json
```
In this example, `/latest` endpoints will reflect the same data as `/v1.1`.

Try it out:
```sh
pip install pipenv
pipenv install --dev
pipenv run uvicorn example.annotation.app:app
# pipenv run uvicorn example.folder_name.app:app
```

## Usage without minor version
```python
from fastapi import FastAPI
from fastapi_versioning import VersionedFastAPI, version

app = FastAPI(title='My App')

@app.get('/greet')
@version(1)
def greet():
  return 'Hello'

@app.get('/greet')
@version(2)
def greet():
  return 'Hi'

app = VersionedFastAPI(app,
    version_format='{major}',
    prefix_format='/v{major}')
```

this will generate two endpoints:
```
/v1/greet
/v2/greet
```
as well as:
```
/docs
/v1/docs
/v2/docs
/v1/openapi.json
/v2/openapi.json
```

## Extra FastAPI constructor arguments

It's important to note that only the `title` from the original FastAPI will be
provided to the VersionedAPI app. If you have any middleware, event handlers
etc these arguments will also need to be provided to the VersionedAPI function
call, as in the example below

```python
from fastapi import FastAPI, Request
from fastapi_versioning import VersionedFastAPI, version
from starlette.middleware import Middleware
from starlette.middleware.sessions import SessionMiddleware

app = FastAPI(
    title='My App',
    description='Greet uses with a nice message',
    middleware=[
        Middleware(SessionMiddleware, secret_key='mysecretkey')
    ]
)

@app.get('/greet')
@version(1)
def greet(request: Request):
    request.session['last_version_used'] = 1
    return 'Hello'

@app.get('/greet')
@version(2)
def greet(request: Request):
    request.session['last_version_used'] = 2
    return 'Hi'

@app.get('/version')
def last_version(request: Request):
    return f'Your last greeting was sent from version {request.session["last_version_used"]}'

app = VersionedFastAPI(app,
    version_format='{major}',
    prefix_format='/v{major}',
    description='Greet users with a nice message',
    middleware=[
        Middleware(SessionMiddleware, secret_key='mysecretkey')
    ]
)
```