semvec/pypi-packages huggingface dataset:
test-dichen-proj 1.0.0.34.15
The dbt Cloud CLI - an ELT tool for running SQL transformations and data models in dbt Cloud.
Requires Python: >=3.10

**[dbt](https://www.getdbt.com/)** enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications.

This package installs the [dbt Cloud CLI](https://docs.getdbt.com/docs/cloud/configure-cloud-cli) to invoke dbt commands from the command line that execute in a [dbt Cloud](cloud.getdbt.com) environment.

## Understanding dbt

Analysts using dbt can transform their data by simply writing select statements, while dbt handles turning these statements into tables and views in a data warehouse.

These select statements, or "models", form a dbt project. Models frequently build on top of one another – dbt makes it easy to [manage relationships](https://docs.getdbt.com/docs/ref) between models, and [visualize these relationships](https://docs.getdbt.com/docs/documentation), as well as assure the quality of your transformations through [testing](https://docs.getdbt.com/docs/testing).

![dbt dag](https://raw.githubusercontent.com/dbt-labs/dbt-core/6c6649f9129d5d108aa3b0526f634cd8f3a9d1ed/etc/dbt-dag.png)

## Join the dbt Community

- Be part of the conversation in the [dbt Community Slack](http://community.getdbt.com/)
- Read more on the [dbt Community Discourse](https://discourse.getdbt.com)
logmiddleware 0.0.4
Simplify the logging of incoming requests and outgoing responses.
Requires Python: >=3.8

# logmiddleware

`logmiddleware` is a Python library designed for use with FastAPI to simplify the logging of incoming requests and outgoing responses. It includes a middleware component that adds essential information to logs, such as request and response details, and supports debugging features.

## Features

- **Middleware for request and response logging:** The library provides a middleware component, `RouterLoggingMiddleware`, to log incoming requests and outgoing responses. It includes features to capture request details, response information, and execution times.

- **Request ID generation:** Automatically generates a unique request ID for each incoming request. If the request includes an `x-api-request-id` header, it uses that value; otherwise, it generates a new UUID.

- **Debugging support:** Enables debugging of response bodies through the use of the `api_debug` flag. When enabled, the response body is included in the logs.

- **JSON logging configuration:** Utilizes the `python-json-logger` library to configure JSON logging. This allows for structured and easily parsable log entries.

## Installation

To install the library, use the following pip command:

```bash
pip install logmiddleware
```

## Usage

### Setting up middleware

```python
import logging
from fastapi import FastAPI
from logmiddleware import RouterLoggingMiddleware, logging_config

# Configure JSON logging
logging.config.dictConfig(logging_config)

app = FastAPI()
# Add the middleware to your FastAPI app
app.add_middleware(
    RouterLoggingMiddleware,
    logger=logging.getLogger(__name__),  # Pass your logger instance
    api_debug=True,  # Set to True to enable debugging of response bodies
)
```

### Accessing request ID in the called function

The `execute_request` method has been updated to set the `request_id` in the `request.state`. You can now access it in the called function using `request.state.request_id`. Here is an example:

```python
# ...

@app.get("/example")
async def example_route(request: Request):
    # Accessing the request_id in the called function
    request_id = request.state.request_id
    return {"message": "Hello, world!", "request_id": request_id}
```

## Configuration

The library relies on a logging configuration dictionary (`logging_config`) to set up JSON logging. Because of that, it includes a default logging configuration (`logging_config`), which you can import for easy setup. Ensure this configuration is properly set before adding the middleware to your FastAPI app.

## Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request on the [Git repository](https://git.slc.ar/slococo/logmiddleware).

## License

This project is licensed under the MIT license.
asyncreq 0.0.6
A lightweight library for making asynchronous HTTP requests.
Requires Python: >=3.8

# asyncreq

`asyncreq` is a lightweight Python library for making asynchronous HTTP requests using `aiohttp`. This library provides two convenient methods for interacting with RESTful APIs in an asynchronous manner.

## Installation

To install the library, use the following pip command:

```bash
pip install asyncreq
```

## Usage

### `make_request`

The `make_request` method allows you to make asynchronous HTTP requests with flexible options. Here's an example of how to use it:

```python
from asyncreq import make_request

async def example_usage():
    url = "https://api.example.com/resource"
    method = "GET"
    headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
    
    try:
        response_data, status_code, response_headers = await make_request(
            url=url,
            method=method,
            headers=headers,
            # Add other optional parameters as needed
        )
        print(f"Response Data: {response_data}")
        print(f"Status Code: {status_code}")
        print(f"Response Headers: {response_headers}")
    except Exception as e:
        print(f"An error occurred: {e}")
```

### `request`

The `request` method is a simplified wrapper around `make_request` with added error handling. It raises appropriate exceptions for common HTTP-related errors:

```python
from asyncreq import request, HTTPException

async def example_usage():
    url = "https://api.example.com/resource"
    method = "GET"
    headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"}
    
    try:
        response_data, status_code, response_headers = await request(
            url=url,
            method=method,
            headers=headers,
            # Add other optional parameters as needed
        )
        print(f"Response Data: {response_data}")
        print(f"Status Code: {status_code}")
        print(f"Response Headers: {response_headers}")
    except HTTPException as e:
        print(f"An HTTP error occurred: {e}")
```

Note: make sure to use `await` as demonstrated in the examples above.

## Dependencies

- [aiohttp](https://docs.aiohttp.org/): Asynchronous HTTP client/server framework.

## Contributing

If you find any issues or have suggestions for improvements, please feel free to open an issue or create a pull request on the [Git repository](https://git.slc.ar/slococo/asyncreq).

## License

This project is licensed under the MIT license.