semvec/pypi-packages huggingface dataset:
raspberry-sensors 2.1.2
This package for getting values from sensors mh_z19, DHT, ads1015
Requires Python: >=3.8
Keywords: raspberry_sensors,Adafruit-DHT,adafruit-circuitpython-ads1x15,mh-z19,raspberry,raspberry pi,sensors,hardware,IoT,Python

# RaspberryPi Sensors Library

This library provides functions to retrieve data from mh_z19, DHT, and ads1015 sensors on a Raspberry Pi. Note that in case of errors, no exceptions are thrown, and the cached sensor value is also returned in case of an error.

## Usage Examples

### Initialization

First, import the library and create an instance of the `Sensors` class.

```python
from raspberry_sensors import Sensors
sensors = Sensors()
```

### Disabling Error Logging

You can disable error logging by passing the `logging_error` parameter equal to `False` when creating an instance of the `Sensors` class.

```python
sensors = Sensors(logging_error=False)
```

### Getting Values from DHT Sensor

To get values from the DHT sensor, use the `get_dht` method, passing the sensor type (`_type`) and the GPIO pin number (`gpio`).

```python
sensors.get_dht(_type=22, gpio=4)
# _type=22 - DHT22
# _type=11 - DHT11
# gpio - GPIO pin

# return data (dict)
# {"humidity": 36.0, "temperature": 21.0}
```

### Getting Values from ADS Sensor

To get values from the ADS sensor, use the `get_ads` method, passing the channel you want to get the voltage from (`channel`), whether to get the normal value using interpolation (`interpolate`), and the minimum and maximum values at 0V (`interpolate_min` and `interpolate_max`).

```python
sensors.get_ads(channel, interpolate=False, interpolate_min=0, interpolate_max=0)
# channel - the channel that you want to get the voltage from
# interpolate - getting the normal value using interpolation
# interpolate_min (use if interpolate True) - minimum value at 0 V
# interpolate_max (use if interpolate True) - maximum value at 0 V

# return data (float)
# if interpolate=False - voltage
# if interpolate=True - the voltage value to which the interpolation formula is applied 
```

### Getting Values from MH-Z19 Sensor

To get values from the MH-Z19 sensor, use the `get_mhz` method, passing the GPIO pin number (`gpio`) and whether to read using PWM (`pwm`).

```python
sensors.get_mhz(gpio=12, pwm=False)
# gpio - GPIO pin
# pwm - if pwm is True it will be read using pwm otherwise it is default

# return data (dict)
# {"co2": 5000}
```
realtime-trains 0.0.5
An unofficial Python library for Realtime Trains API
Requires Python: >=3.10,<4.0

# Introduction #

This is an unofficial Python library for the [Realtime Trains API](https://www.realtimetrains.co.uk/).

The library allows you to make calls to the Realtime Trains API, and receive full response as JSON, or as custom objects. Some basic helper filtering of data is also included.

# Requirements #

This library requires you to use your own API key, which (at the time of writing) can be obtained for free from Realtime Trains [developer website](https://api.rtt.io/).

Once registered and logged in, please make note of the **API Auth Credentials** that have automatically been generated for your account.

# Installation #

Use pip to install this library. We recommend you use it within a virtual environment (either with `venv` or `poetry`).

```bash
pip install realtime-trains
```

# Usage #

To be able to use the library, you need to authenticate yourself. The result will be an object which you can then use to query the Realtime Trains data.

```python
from realtime_trains.realtime_trains.api import RealtimeTrainsApi, SearchOptions

rtt = RealtimeTrainsApi(username="<your_rtt_username>", password="<your_rtt_password>")
```

## Request station information ##

To specify the search options, use the `SearchOptions` class.

```python
options = SearchOptions(
	from_station = "CLJ",	# required
	to_station = "WAT",		# optional
	date = "25 Jan 2024", 	# optional
	time = "13:45",			# optional
	platform = "2",			# optional
	num_results = 5,		# optional
	passenger_only = True,	# optional
	show_arrivals = False,	# optional
	show_trains_only = True	# optional
)
```

**NOTE:** Not all options apply to all calls.

After you have created your authenticated object and you specified the search options, you can start requesting data.

### Get raw json response ###

```python
json = rtt.get_search_json(options)
```

### Get resulting data as an object ###

```python
data = rtt.get_search(options)
```

### Get data as a list of train services ###

```python
services = rtt.get_search_services(options)
```

# Reporting issues #

Please report all the issues and feature requests via [GitHub](https://github.com/mbukovac/realtime-trains/issues).

Enjoy!
NomanBot 0.2.0
A brief description of your project

# noman

A simple package for generating responses using g4f.


## First Install

pip install NomanBot

import NomanBot

# Call the response function from NomanBot module
result = NomanBot.response(user_input)

# Print the result
print(result)



>>>>Hello! It looks like there might be a small typo in your greeting. Did you mean to say "Hello, World!"? How can I assist you today?