semvec/pypi-packages huggingface dataset:
court-listener 0.0.1
A python client for the Court Listener API
License: MIT
Requires Python: <4.0,>=3.8
Keywords: API, requests, client, courts, legal, law

# court_listener

`court_listener` is a Python client library for interacting with the Court Listener API. It provides an easy way to access and query court data from the Court Listener API, which offers access to a wealth of legal information including case law, opinions, and more.

## Features

- **Simple API Interaction**: Easily interact with the Court Listener API using a straightforward Python client.
- **Prettified JSON Output**: By default JSON responses are prettified for better readability. This can be changed by setting prettify to False in the class constructor.
- **Error Handling**: Includes built-in error handling to manage API request issues gracefully.

## Installation

You can install `court_listener` via pip:

```bash
pip install court-listener
```

## Usage

### Making API Requests

You can interact with different API endpoints using specialized classes provided within the `apis` module. For example, to use the search functionality:

```python
from court_listener.apis.search import Search

search_client = Search(api_key="your_api_key")
response = search_client.get_search(query="case law", start_date="2023-01-01", end_date="2023-12-31")
print(response)
```

## Error Handling

The library includes error handling to manage potential issues with API requests. Ensure that any API errors are handled appropriately in your implementation.

## Court Listener Documentation

Users should reference the Court Listener docs for more information. According to the docs, "Our APIs allow 5,000 queries per hour to authenticated users. Unauthenticated users are allowed 100 queries per day for experimentation." To read further and get your own api key, visit their site [here](https://www.courtlistener.com/help/api/rest/)

## Contributing

Contributions are welcome! Please submit issues or pull requests on [GitHub](https://github.com/SpyderRex/court_listener).

## License

`court_listener` is open-source software licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

## Contact

For questions or support, please contact [billyjohnsonauthor@gmail.com](mailto: billyjohnsonauthor@gmail.com).
MyPubSub 0.1.1
A basic Python library for a Singleton Pub Sub System
License: MIT
Requires Python: >=3.8

# MyPubSub

MyPubSub is a Python library implementing the publish-subscribe pattern. It provides a simple and effective way to manage event-driven communication between different parts of an application. This project also demonstrates the use of the Singleton pattern to ensure that only one instance of the PubSub system exists.

## Features

- **Publish-Subscribe Pattern**: Facilitate event-based communication where publishers send messages and subscribers receive them.
- **Singleton Pattern**: Ensures only a single instance of the PubSub system exists throughout the application.
- **Flexible Event Management**: Allows for dynamic subscription and unsubscription of events.

## Installation

To use the MyPubSub library, you need to install the required dependencies. You can install them using `pip`:

```bash
pip install .
```

## Dependencies

- Python 3.8 or higher
- `pylint` (for code quality checks)
- `pytest` (for testing)

## Usage

Here’s a basic example of using the MyPubSub class:

```python
from mypubsub import MyPubSub

# Get the singleton instance of MyPubSub
pubsub = MyPubSub.get_instance()

# Define a callback function for subscribers
def handle_message(message):
    print(f"Received message: {message}")

# Subscribe to an event
pubsub.subscribe('event_topic', handle_message)

# Publish a message to the event
pubsub.publish('event_topic', 'Hello, World!')

# Unsubscribe from the event
pubsub.unsubscribe('event_topic', handle_message)

# Reset the singleton instance (useful for testing)
MyPubSub.reset_instance()
```


## Testing

To run tests, ensure pytest is installed:

```bash
pip install pytest
```

Then execute the tests with:

```bash
pytest
```

## Contributing

Contributions are welcome! To contribute, fork the repository, create a new branch, and submit a pull request. Ensure that your changes include appropriate tests.