semvec/pypi-packages huggingface dataset:
ip-restriction 1.0.0
A middleware for IP-based access restriction in Django
Requires Python: >=3.0

# IP Restriction Middleware

A Django middleware for restricting access based on IP addresses.

## Installation

```sh
pip install ip_restriction_middleware

# Usage
    To use the IPRestrictionMiddleware in your Django project, follow these steps:

## 1. Add Middleware to Django Settings
        Add IPRestrictionMiddleware to the MIDDLEWARE list in your Django settings (settings.py):

```sh
# settings.py

MIDDLEWARE = [
    # Other middleware...
    'ip_restriction_middleware.middleware.IPRestrictionMiddleware',
    # Other middleware...
]

## 2. Configure IP and Path Restrictions
        Add the following settings to configure the allowed IP addresses and restricted paths:

```sh
# settings.py

# List of IP addresses allowed to access non-admin paths
ALLOWED_IPS = ['127.0.0.1', '192.168.1.1']

# List of IP addresses allowed to access admin paths
ALLOWED_ADMIN_IPS = ['127.0.0.1', '192.168.1.1']

# Dictionary of restricted paths with IP restrictions
RESTRICTED_PATH = {
    "127.0.0.1": ["/test/servicev1/", "/test/servicev2/", "/test/servicev3/"],
    "2.0.34.22": ["/test/servicev2/"],
    "2.0.30.1,127.0.0.2": ["/test/servicev3/"]
}

# Middleware Details
## IPRestrictionMiddleware
    The IPRestrictionMiddleware class is responsible for checking the client's IP address against the allowed lists and the restricted paths. If the IP address is not allowed to access the requested path, the middleware returns a 403 Forbidden response.

#Initialization
    The middleware is initialized with the following attributes:

    allowed_ips: Set of allowed IP addresses for non-admin paths.
    allowed_admin_ips: Set of allowed IP addresses for admin paths.
    restricted_paths_and_IP: Dictionary of restricted paths and their allowed IP addresses.
    Request Processing
    The middleware processes each request to check the client's IP address and the requested path. If the IP address is not allowed, it returns a 403 Forbidden response.

#License
    This project is licensed under the MIT License. See the LICENSE file for details.

#Contributing
    Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.

#Contact
    For questions or comments, please contact Bothraj P.
here-transit 1.2.1
Asynchronous Python client for the HERE Transit V8 API
Requires Python: >=3.10
Keywords: aiohttp, asyncio, here, here-api, routing

# here_transit

Asynchronous Python client for the HERE Transit V8 API

[![GitHub Actions](https://github.com/eifinger/here_transit/workflows/CI/badge.svg)](https://github.com/eifinger/here_transit/actions?workflow=CI)
[![PyPi](https://img.shields.io/pypi/v/here_transit.svg)](https://pypi.python.org/pypi/here_transit)
[![PyPi](https://img.shields.io/pypi/l/here_transit.svg)](https://github.com/eifinger/here_transit/blob/master/LICENSE)
[![codecov](https://codecov.io/gh/eifinger/here_transit/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/here_transit)
[![Downloads](https://pepy.tech/badge/here_transit)](https://pepy.tech/project/here_transit)

## Installation

```bash
pip install here_transit
```

## Usage

```python
import asyncio

from here_transit import HERETransitApi, Place, Return

API_KEY = "<YOUR_API_KEY>"


async def main() -> None:
    """Show example how to get location of your tracker."""
    async with HERETransitApi(api_key=API_KEY) as here_transit:
        response = await here_transit.route(
            origin=Place(latitude=50.12778680095556, longitude=8.582081794738771),
            destination=Place(latitude=50.060940891421765, longitude=8.336477279663088),
            return_values=[Return.TRAVEL_SUMMARY],
        )
        print(
            f"Duration is: {response['routes'][0]['sections'][0]['travelSummary']['duration']}"
        )


if __name__ == "__main__":
    asyncio.run(main())
```
ip-restriction-middleware 1.0.2
A middleware for IP-based access restriction in Django
Requires Python: >=3.0

# IP Restriction Middleware

A Django middleware for restricting access based on IP addresses.

## Installation

```sh
pip install ip_restriction_middleware

# Usage
    To use the IPRestrictionMiddleware in your Django project, follow these steps:

## 1. Add Middleware to Django Settings
        Add IPRestrictionMiddleware to the MIDDLEWARE list in your Django settings (settings.py):

```sh
# settings.py

MIDDLEWARE = [
    # Other middleware...
    'ip_restriction_middleware.middleware.IPRestrictionMiddleware',
    # Other middleware...
]

## 2. Configure IP and Path Restrictions
        Add the following settings to configure the allowed IP addresses and restricted paths:

```sh
# settings.py

# List of IP addresses allowed to access non-admin paths
ALLOWED_IPS = ['127.0.0.1', '192.168.1.1']

# List of IP addresses allowed to access admin paths
ALLOWED_ADMIN_IPS = ['127.0.0.1', '192.168.1.1']

# Dictionary of restricted paths with IP restrictions
RESTRICTED_PATH = {
    "127.0.0.1": ["/test/servicev1/", "/test/servicev2/", "/test/servicev3/"],
    "2.0.34.22": ["/test/servicev2/"],
    "2.0.30.1,127.0.0.2": ["/test/servicev3/"]
}

# Middleware Details
## IPRestrictionMiddleware
    The IPRestrictionMiddleware class is responsible for checking the client's IP address against the allowed lists and the restricted paths. If the IP address is not allowed to access the requested path, the middleware returns a 403 Forbidden response.

#Initialization
    The middleware is initialized with the following attributes:

    allowed_ips: Set of allowed IP addresses for non-admin paths.
    allowed_admin_ips: Set of allowed IP addresses for admin paths.
    restricted_paths_and_IP: Dictionary of restricted paths and their allowed IP addresses.
    Request Processing
    The middleware processes each request to check the client's IP address and the requested path. If the IP address is not allowed, it returns a 403 Forbidden response.

#License
    This project is licensed under the MIT License. See the LICENSE file for details.

#Contributing
    Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.

#Contact
    For questions or comments, please contact Bothraj P.
turtle-art-manager 1.5
A package for making turtle art
Keywords: python, turtle, python turtle, python art

# Turtle-Art-Manager

The Turtle-Art-Manager package provides Python classes for creating artistic drawings using Turtle graphics.

## Installation

You can install the Turtle-Art package using pip:

```bash
pip install turtle-art-manager
```

## Classes

### TurtleArt Class

The `TurtleArt` class serves as an abstract base class for creating various artistic shapes using Turtle graphics.

#### Usage

```python
from turtle import Screen, Turtle
from turtle_art_manager import TurtleArt


class MyArt(TurtleArt):
    def _draw_art(self) -> None:
        pass


# Example usage:
screen = Screen()
pen = Turtle()
artwork = MyArt(screen, pen)
artwork.draw()
screen.mainloop()
```

#### Methods

- **draw()**: Draws the artistic shape on the screen.

### Rectangle Class

The `Rectangle` class is a subclass of `TurtleArt` that allows you to draw rectangles on the screen.

#### Usage

```python
from turtle import Screen, Turtle
from turtle_art_manager import Rectangle

# Example usage:
screen = Screen()
pen = Turtle()
rectangle = Rectangle(screen, pen, width=150, height=80)
rectangle.draw(fill_color=True)
screen.mainloop()
```

### Circle Class

The `Circle` class is another subclass of `TurtleArt` that allows you to draw circles on the screen.

#### Usage

```python
from turtle import Screen, Turtle
from turtle_art_manager import Circle

# Example usage:
screen = Screen()
pen = Turtle()
circle = Circle(screen, pen, radius=50)
circle.draw(fill_color=True)
screen.mainloop()
```

#### Attributes

- **width** (int): Width of the rectangle.
- **height** (int): Height of the rectangle.