semvec/pypi-packages huggingface dataset:
verifyauth 0.1.31
A decorator for FastAPI to verify authentication and authorization via an external service.
Requires Python: >=3.6

# python-ws-microservico-modulo-verificar-autenticacao-service

This project provides a decorator for FastAPI to verify authentication and authorization via an external service.

## Features

- A FastAPI-compatible decorator for authentication and authorization.
- Easy integration with external authentication services.
- Customizable to fit different authentication flows.

## Installation

You can install the module using pip:

```bash
pip install verifyauth
```

## Usage

This package allows you to add an authentication layer to FastAPI endpoints via a decorator. Example usage:

```python
from verifyauth import AuthDecorator
from fastapi import FastAPI

app = FastAPI()

auth = AuthDecorator(service_url="https://auth.example.com")

@app.get("/protected")
def verifyauth(servico, capacidade, response_tag = 'obterVipCadastroResponse2', result_tag = 'obterVipCadastroResult2'):
@verifyauth(servico='example', capacidade='test', response_tag='capacidadeServicoResponse', result_tag='capacidadeServicoResult')    
def protected_endpoint():
    return {"message": "This is a protected route"}
```

## Build and Deployment

### Build the Package

Before deploying the package to TestPyPI or PyPI, you need to build the distribution files. The build process will create both a source distribution (`.tar.gz`) and a wheel distribution (`.whl`).

To build the package, first ensure the `build` module is installed:

```bash
pip install build
```



Then, run the following command to create the distribution files:

```bash
python -m build
```

This will generate the distribution files in the `dist/` directory.

### Upload to TestPyPI

To upload the package, first ensure the `twine` module is installed:

```bash
pip install twine
```

To upload the package to TestPyPI for testing purposes:

```bash
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

After uploading, you can install it from TestPyPI using:

```bash
pip install --index-url https://test.pypi.org/simple/ verifyauth
```

### Upload to PyPI

Once you've tested the package on TestPyPI and are ready to publish it, upload it to PyPI:

```bash
twine upload dist/*
```

You can then install it via PyPI using:

```bash
pip install verifyauth
```
fastapi-watchlog-apm 1.0.2
Lightweight APM for FastAPI that sends metrics to Watchlog Agent
Requires Python: >=3.7

# APM for FastAPI – Watchlog Integration

🎯 Lightweight and production-safe Application Performance Monitoring (APM) middleware for FastAPI apps, built for [Watchlog](https://watchlog.io).

Tracks route execution time, status codes, memory usage, and errors — and sends them periodically to your Watchlog agent in aggregated form.

---

## 🚀 Features

- 🔧 Automatic tracking of all FastAPI routes
- 📊 Aggregation of metrics by path pattern and method (e.g., `/user/{id}`)
- ⚠️ Optional error tracking
- 🌐 Sends metrics to Watchlog agent over HTTP
- 🧠 Captures memory usage (`heapUsed`, `heapTotal`)
- 💡 Safe-by-default (never crashes your app)
- 🔄 Handles dynamic routes with correct pattern detection

---

## 📦 Installation

```bash
pip install fastapi_watchlog_apm
```

---

## ⚙️ Usage

Here’s a complete example:

```python
from fastapi import FastAPI
from fastapi_watchlog_apm import WatchlogAPMMiddleware, apm_exception_handler, start

app = FastAPI()

# Register error handler (optional)
apm_exception_handler(app, service="my-fastapi-service")

# Define routes
@app.get("/user/{user_id}")
async def get_user(user_id: int):
    return {"user": user_id}

@app.get("/fail")
async def fail():
    raise Exception("error")

# Wrap the app with APM middleware (must be after routes)
app = WatchlogAPMMiddleware(app, service="my-fastapi-service")

# Start background sender
start()
```

---

## 🛠️ Service Name

You can define your service name like this:

```python
WatchlogAPMMiddleware(app, service="my-fastapi-service")
apm_exception_handler(app, service="my-fastapi-service")
```

Or set it in environment variables:

```bash
export WATCHLOG_APM_SERVICE=users-api
```

Fallbacks to `APP_NAME` or defaults to `fastapi-app`.

---

## 📤 What gets sent

Example payload every 10 seconds:

```json
{
  "collected_at": "2025-05-18T12:00:00Z",
  "platformName": "fastapi",
  "metrics": [
    {
      "type": "aggregated_request",
      "service": "users-api",
      "path": "/user/{user_id}",
      "method": "GET",
      "request_count": 3,
      "error_count": 1,
      "avg_duration": 9.2,
      "max_duration": 13.4,
      "avg_memory": {
        "heapUsed": 13930496,
        "heapTotal": 13930496
      }
    }
  ]
}
```

---

## 📁 Recommended `.gitignore`

```gitignore
/storage/logs/apm-buffer.json
/storage/framework/cache/watchlog-apm.lock
```

---

## ✅ Notes

- Uses `scope['route'].path` to extract route pattern like `/user/{user_id}`
- You must wrap your app **after defining routes**
- Error tracking is optional but recommended
- Metrics are batched in memory/file and flushed every 10 seconds

---

## 📝 License

MIT © Mohammadreza  
Built for [Watchlog.io](https://watchlog.io)
geocat.datafiles 2025.7.1
GeoCAT-datafiles hosts data files used by other GeoCAT packages to test or demonstrate functionality
Requires Python: >=3.10


|  **License**    |   [![License][license-badge]][repo-link]                |
| :---------------| :-------------------------------------------------------|
|  **Package**    |   [![Conda][conda-forge-badge]][conda-forge-link]       |
|  **Repository** |   [![Repo-Size][repo-size-badge]][repo-size-link]       |


# GeoCAT-datafiles

This repository contains data files used by 
[GeoCAT-examples](https://github.com/NCAR/geocat-examples) and other GeoCAT components
to test or demonstrate GeoCAT functionality. The repo has several directories for data files
in different formats (e.g. netCDF) and provides a convenience function to access those files with ease:

`geocat.datafiles.get(fname)`
    
where `fname` should be given as a string of the format `"folder_name/file_name"`, e.g. `"netcdf_files/any_file.nc"`.

This function fetches the file by reading from local storage, if any, or
downloading from the GeoCAT-datafiles repository with the help of
[Pooch](https://www.fatiando.org/pooch).


# Documentation

[Installation guide](INSTALLATION.md)

[Contributing guide](CONTRIBUTING.md)

# Citing GeoCAT-datafiles

If you use this software, please cite it as described on the [citation](https://github.com/NCAR/geocat-datafiles/blob/main/CITATION.md) page.

[comment]: <> (Links for badges and status)
[license-badge]: https://img.shields.io/github/license/NCAR/geocat-datafiles?style=for-the-badge
[repo-link]: https://github.com/NCAR/geocat-datafiles
[conda-forge-badge]: https://img.shields.io/conda/vn/conda-forge/geocat-datafiles?logo=anaconda&style=for-the-badge
[conda-forge-link]: https://anaconda.org/conda-forge/geocat-datafiles
[repo-size-badge]: https://img.shields.io/github/repo-size/NCAR/geocat-datafiles?style=for-the-badge
[repo-size-link]: https://github.com/NCAR/geocat-datafiles
collektions 1.1.1
A collection of Python functions on iterables and collections inspired by the Kotlin collections API.
Requires Python: >=3.9

# colleKtions
A collection of Python functions on iterables and collections inspired by the 
[Kotlin collections standard library API](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/#functions).

For the curious, the name is a reference to the Kotlin collections API in two ways: 
1. The name collections, which is obvious
2. The intentional misspelling with a K since `kt` is the file extension used for Kotlin source 
   files.