semvec/pypi-packages huggingface dataset:
devpi-passwd-reset 2.0.1
devpi-passwd-reset: password reset view for devpi-web
License: MIT
Requires Python: >=3.7

devpi-passwd-reset: password reset view for devpi-web
=====================================================

This plugin adds a new view allowing users to reset their passwords.


Installation
------------

``devpi-passwd-reset`` needs to be installed alongside ``devpi-web``.

You can install it with::

    pip install devpi-passwd-reset

There are no further installation steps needed as ``devpi-server`` will automatically discover the plugin through calling hooks using the setuptools entry points mechanism.


Usage
-----

In a default installation, the view would be accessible at ``http://localhost:3141/+password-reset``.

Users can enter a user name or email address.
If a matching user exists and has the email set, a mail is sent with a link to set a new password.
The link is valid for 24h as long as the password wasn't changed in the meantime.

Configuration
-------------

You have to configure mail server settings by providing ``--passwd-reset-config=path_to_config``.

Create a yaml file with a dictionary containing another dictionary under the ``pyramid_mailer`` key.

You must at least provide the ``mail.default_sender`` setting.
By default ``mail.host`` is ``localhost`` and ``mail.port`` is ``25``.

See http://pythonhosted.org/pyramid_mailer/#configuration on configuration options available.

Example config:

.. code-block:: yaml

    pyramid_mailer:
        mail.port: 8025
        mail.default_sender: mail@example.com


devpi-passwd-reset plugin hooks
-------------------------------

Plugins can add password validation to enforce policies using the ``devpi_passwd_reset`` entry point in ``setup.py``.

.. code-block:: python

    def devpipasswdreset_validate(password):
        """Called to validate a password.

          Raises ValueError which is used as message to the user.
        """


Changelog
=========

2.0.1 - 2025-07-06
------------------

- Fix compatibility with devpi-server 6.17.0.

- Remove usage of unmaintained py library.


2.0.0 - 2023-12-19
------------------

- drop support for Python <= 3.6.

- require devpi-server>=6.0.0


1.0.0 - 2016-06-29
------------------

- initial release
aioddd 1.6.0
Async Python DDD utilities library.
License: MIT
Requires Python: >=3.10
Keywords: ddd, hexagonal, cqrs, aio, async

# Async Python DDD utilities library

[![PyPI version](https://badge.fury.io/py/aioddd.svg)](https://badge.fury.io/py/aioddd)
[![PyPIDownloads](https://static.pepy.tech/badge/aioddd)](https://pepy.tech/project/aioddd)
[![CI](https://github.com/aiopy/python-aioddd/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/aiopy/python-aioddd/actions/workflows/ci.yml)

aioddd is an async Python DDD utilities library.

## Installation

Use the package manager [pip](https://pypi.org/project/aioddd/) to install aioddd.

```bash
pip install aioddd
```

## Documentation

- Visit [aioddd docs](https://aiopy.github.io/python-aioddd/).

## Usage

```python
from asyncio import get_event_loop
from dataclasses import dataclass
from typing import Type
from aioddd import NotFoundError, \
    Command, CommandHandler, SimpleCommandBus, \
    Query, QueryHandler, OptionalResponse, SimpleQueryBus, Event

_products = []

class ProductStored(Event):
    @dataclass
    class Attributes:
        ref: str

    attributes: Attributes

class StoreProductCommand(Command):
    def __init__(self, ref: str):
        self.ref = ref

class StoreProductCommandHandler(CommandHandler):
    def subscribed_to(self) -> Type[Command]:
        return StoreProductCommand

    async def handle(self, command: StoreProductCommand) -> None:
        _products.append(command.ref)

class ProductNotFoundError(NotFoundError):
    _code = 'product_not_found'
    _title = 'Product not found'

class FindProductQuery(Query):
    def __init__(self, ref: str):
        self.ref = ref

class FindProductQueryHandler(QueryHandler):
    def subscribed_to(self) -> Type[Query]:
        return FindProductQuery

    async def handle(self, query: FindProductQuery) -> OptionalResponse:
        if query.ref != '123':
            raise ProductNotFoundError.create(detail={'ref': query.ref})
        return {'ref': query.ref}

async def main() -> None:
    commands_bus = SimpleCommandBus([StoreProductCommandHandler()])
    await commands_bus.dispatch(StoreProductCommand('123'))
    query_bus = SimpleQueryBus([FindProductQueryHandler()])
    response = await query_bus.ask(FindProductQuery('123'))
    print(response)


if __name__ == '__main__':
    get_event_loop().run_until_complete(main())
```

## Requirements

- Python >= 3.10

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

[MIT](https://github.com/aiopy/python-aioddd/blob/master/LICENSE)