Tomodachi

Latest version: v0.28.3

Safety actively analyzes 714792 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 8 of 26

0.21.1

- Added `sentry_sdk` to the list of modules and packages to not be unloaded from `sys.modules` during hot reload of the running when code changes has been noticed. This to prevent errors like `TypeError: run() takes 1 positional argument but X were given` from `sentry_sdk.integrations.threading` when handling early errors or leftover errors from previous session.

0.21.0

- Uses the socket option `SO_REUSEPORT` by default on Linux unless specifically disabled via the `http.reuse_port` option set to `False`. This will allow several processes to bind to the same port, which could be useful when running services via a process manager such as `supervisord` or when it's desired to run several processes of a service to utilize additional CPU cores. The `http.reuse_port` option doesn't have any effect when a service is running on a non-Linux platform. (github: **tranvietanh1991**)
- Services which works as AMQP consumers now has a default prefetch count value of 100, where previously the service didn't specify any prefetch count option, which could exhaust the host's resources if messages would be published faster to the queue than the services could process them. (github: **tranvietanh1991**)
- AWS SNS+SQS calls now uses a slightly changed config which will increase the connection pool to 50 connections, decreases the connect timeout to 8 seconds and the read timeout to 35 seconds.
- Possible to run services using without using the `tomodachi` CLI, by adding `tomodachi.run()` to the end of the Python file invoked by `python` which will start services within that file. Usually in a `if __name__ == "__main__":` if-block.
- The environment variable `TOMODACHI_LOOP` can be used to specify the event loop implementation in a similar way as the CLI argument `--loop [auto|asyncio|uvloop]` would.
- Environment variable `TOMODACHI_PRODUCTION` set to `1` can be used to run the service without the file watcher for automatic code reloads enabled, which then yields higher performance. Equivalent as starting the service with the `--production` argument.
- Smaller performance improvements throughout the framework.
- Improved error handling overall in regards to non-standard exceptions and additional output, if scheduled tasks are unable to run due to other start methods not completing their initial setup.

0.20.7

- Reworked type hinting annotations for AWS SNS+SQS filter policies as there were still cases found in the previous tomodachi version that didn't work as they should, and raised mypy errors where a correct filter policy had been applied.

0.20.6

- Fixes a type annotation for the `aws_sns_sqs` decorator's keyword argument `filter_policy`, which could result in a `mypy` error if an "anything-but" filter policy was used.

0.20.5

- Await potential lingering connection responses before shutting down HTTP server.

0.20.4

- Optimizations for HTTP based function tasks, which should lower the base CPU usage for `tomodachi.http` decorated tasks between 5% - 25% when using middlewares or the default access log.

Page 8 of 26

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.