orionis 0.691.0__tar.gz → 0.693.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {orionis-0.691.0/orionis.egg-info → orionis-0.693.0}/PKG-INFO +1 -1
- {orionis-0.691.0 → orionis-0.693.0}/orionis/metadata/framework.py +1 -1
- orionis-0.693.0/orionis/services/asynchrony/contracts/coroutines.py +77 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/asynchrony/coroutines.py +40 -45
- orionis-0.693.0/orionis/services/environment/contracts/env.py +110 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/core/dot_env.py +42 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/dynamic/caster.py +73 -24
- orionis-0.693.0/orionis/services/environment/env.py +189 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/helpers/functions.py +4 -4
- {orionis-0.691.0 → orionis-0.693.0/orionis.egg-info}/PKG-INFO +1 -1
- orionis-0.691.0/orionis/services/asynchrony/contracts/coroutines.py +0 -76
- orionis-0.691.0/orionis/services/environment/contracts/env.py +0 -77
- orionis-0.691.0/orionis/services/environment/env.py +0 -133
- {orionis-0.691.0 → orionis-0.693.0}/LICENCE +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/MANIFEST.in +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/README.md +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/app.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/args/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/args/argument.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/base/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/base/command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/base/scheduler.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/base/scheduler_event_listener.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/__publisher__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/cache_clear.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/help.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/log_clear.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/make_command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/scheduler_list.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/scheduler_work.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/test.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/commands/version.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/base_command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/base_scheduler.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/cli_request.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/console.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/dumper.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/event.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/executor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/kernel.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/progress_bar.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/reactor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/schedule.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/contracts/schedule_event_listener.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/core/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/core/reactor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/debug/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/debug/dumper.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/dynamic/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/dynamic/progress_bar.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/event.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/event_job.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_error.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_event_data.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_paused.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_resumed.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_shutdown.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/entities/scheduler_started.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/enums/actions.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/enums/listener.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/enums/styles.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/exceptions/cli_exceptions.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/fluent/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/fluent/command.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/fluent/event.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/kernel.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/output/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/output/console.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/output/executor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/request/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/request/cli_request.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/stubs/command.stub +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/stubs/listener.stub +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/tasks/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/console/tasks/schedule.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/container.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/context/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/context/manager.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/context/scope.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/contracts/container.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/contracts/service_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/entities/binding.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/enums/lifetimes.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/exceptions/container.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/facades/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/facades/facade.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/providers/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/container/providers/service_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/base/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/base/handler.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/catch.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/contracts/catch.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/contracts/handler.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/failure/entities/throwable.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/application.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/entities/app.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/enums/ciphers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/app/enums/environments.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/auth/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/auth/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/auth/entities/auth.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/entities/cache.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/entities/file.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/entities/stores.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cache/enums/drivers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cors/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cors/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/cors/entities/cors.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/connections.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/database.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/mysql.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/oracle.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/pgsql.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/entities/sqlite.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/mysql_charsets.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/mysql_collations.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/mysql_engine.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/oracle_encoding.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/oracle_nencoding.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/pgsql_charsets.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/pgsql_collations.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/pgsql_mode.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/sqlite_foreign_key.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/sqlite_journal.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/database/enums/sqlite_synchronous.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/aws.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/disks.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/filesystems.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/local.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/filesystems/entitites/public.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/channels.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/chunked.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/daily.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/hourly.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/logging.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/monthly.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/stack.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/entities/weekly.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/enums/levels.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/validators/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/validators/level.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/logging/validators/path.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/entities/file.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/entities/mail.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/entities/mailers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/mail/entities/smtp.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/entities/brokers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/entities/database.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/entities/queue.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/queue/enums/strategy.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/roots/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/roots/paths.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/entities/session.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/enums/same_site_policy.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/helpers/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/session/helpers/secret_key.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/startup.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/entities/testing.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/enums/drivers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/enums/mode.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/config/testing/enums/verbosity.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/contracts/application.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/exceptions/application.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/catch_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/cli_request_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/console_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/directory_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/dumper_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/executor_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/inspirational_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/logger_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/performance_counter_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/progress_bar_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/reactor_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/scheduler_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/testing_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/foundation/providers/workers_provider.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/metadata/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/metadata/package.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/asynchrony/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/asynchrony/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/asynchrony/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/asynchrony/exceptions/asynchrony.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/encrypter/encrypter.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/contracts/caster.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/core/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/dynamic/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/enums/value_type.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/exceptions/environment.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/helpers/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/key/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/key/key_generator.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/validators/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/validators/key_name.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/environment/validators/types.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/file/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/file/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/file/contracts/directory.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/file/directory.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/inspirational/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/inspirational/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/inspirational/contracts/inspire.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/inspirational/inspire.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/inspirational/quotes.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/abstract/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/abstract/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/abstract/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/abstract/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/callables/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/callables/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/callables/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/callables/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/concretes/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/concretes/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/concretes/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/concretes/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/entities/argument.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/entities/resolve_argument.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/dependencies/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/exceptions/introspection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/instances/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/instances/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/instances/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/instances/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/modules/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/modules/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/modules/contracts/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/modules/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/objects/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/objects/types.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/introspection/reflection.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/contracts/log_service.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/exceptions/log.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/handlers/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/handlers/filename.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/handlers/size_rotating.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/handlers/timed_rotating.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/log/log_service.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/contracts/imports.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/contracts/workers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/imports.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/runtime/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/runtime/imports.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/services/system/workers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/entities/base.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/application.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/application.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/console.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/console.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/directory.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/directory.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/dumper.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/dumper.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/executor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/executor.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/inspire.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/inspire.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/logger.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/logger.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/performance_counter.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/performance_counter.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/progress_bar.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/progress_bar.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/reactor.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/reactor.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/testing.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/testing.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/workers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/facades/workers.pyi +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/exceptions/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/exceptions/contracts/parser.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/exceptions/parser.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/formatter/serializer.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/patterns/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/patterns/singleton/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/patterns/singleton/meta.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/performance/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/performance/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/performance/contracts/counter.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/performance/counter.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/contracts/std.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/exceptions/standard.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/standard/std.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/wrapper/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/wrapper/dataclass.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/support/wrapper/dot_dict.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/cases/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/cases/asynchronous.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/cases/synchronous.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/dumper.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/kernel.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/logs.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/printer.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/render.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/test_result.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/contracts/unit_test.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/core/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/core/unit_test.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/entities/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/entities/result.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/enums/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/enums/status.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/config.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/failure.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/persistence.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/runtime.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/exceptions/value.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/kernel.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/output/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/output/dumper.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/output/printer.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/records/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/records/logs.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/base_path.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/execution_mode.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/fail_fast.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/folder_path.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/module_name.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/name_pattern.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/pattern.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/persistent.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/persistent_driver.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/throw_exception.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/verbosity.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/web_report.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/validators/workers.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/view/__init__.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/view/render.py +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis/test/view/report.stub +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis.egg-info/SOURCES.txt +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis.egg-info/dependency_links.txt +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis.egg-info/not-zip-safe +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis.egg-info/requires.txt +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/orionis.egg-info/top_level.txt +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/setup.cfg +0 -0
- {orionis-0.691.0 → orionis-0.693.0}/setup.py +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from abc import ABC, abstractmethod
|
|
3
|
+
from typing import TypeVar, Union
|
|
4
|
+
|
|
5
|
+
T = TypeVar("T")
|
|
6
|
+
|
|
7
|
+
class ICoroutine(ABC):
|
|
8
|
+
|
|
9
|
+
@abstractmethod
|
|
10
|
+
def invoke(self, *args, **kwargs) -> Union[T, asyncio.Task, None]:
|
|
11
|
+
"""
|
|
12
|
+
Invokes the wrapped coroutine or callable function with the provided arguments.
|
|
13
|
+
|
|
14
|
+
This method determines whether the target is a coroutine or a regular callable,
|
|
15
|
+
and executes it accordingly. It adapts to the current event loop context,
|
|
16
|
+
handling both synchronous and asynchronous execution. Exceptions are wrapped
|
|
17
|
+
with context information for easier debugging.
|
|
18
|
+
|
|
19
|
+
Parameters
|
|
20
|
+
----------
|
|
21
|
+
*args : tuple
|
|
22
|
+
Positional arguments to pass to the callable function.
|
|
23
|
+
**kwargs : dict
|
|
24
|
+
Keyword arguments to pass to the callable function.
|
|
25
|
+
|
|
26
|
+
Returns
|
|
27
|
+
-------
|
|
28
|
+
Union[T, asyncio.Task, None]
|
|
29
|
+
The result of the coroutine if executed synchronously, an asyncio.Task if scheduled
|
|
30
|
+
for asynchronous execution, or None if the callable is not a coroutine function.
|
|
31
|
+
|
|
32
|
+
Raises
|
|
33
|
+
------
|
|
34
|
+
OrionisCoroutineException
|
|
35
|
+
If an error occurs during coroutine execution.
|
|
36
|
+
RuntimeError
|
|
37
|
+
If an error occurs during callable execution that is not coroutine-related.
|
|
38
|
+
|
|
39
|
+
Notes
|
|
40
|
+
-----
|
|
41
|
+
- Only callable objects can be invoked with this method.
|
|
42
|
+
- For coroutine functions, execution context is automatically detected.
|
|
43
|
+
- Non-coroutine callables are executed directly and return None.
|
|
44
|
+
- Exceptions are wrapped with appropriate context information.
|
|
45
|
+
"""
|
|
46
|
+
# This method should be implemented by subclasses to handle invocation logic.
|
|
47
|
+
pass
|
|
48
|
+
|
|
49
|
+
@abstractmethod
|
|
50
|
+
def run(self) -> Union[T, asyncio.Future]:
|
|
51
|
+
"""
|
|
52
|
+
Executes the wrapped coroutine, adapting to the current event loop context.
|
|
53
|
+
|
|
54
|
+
This method determines whether to execute the coroutine synchronously or schedule it
|
|
55
|
+
asynchronously based on the presence of an active event loop. It ensures that the coroutine
|
|
56
|
+
is executed in the most appropriate manner for the current context, handling event loop
|
|
57
|
+
issues gracefully.
|
|
58
|
+
|
|
59
|
+
Returns
|
|
60
|
+
-------
|
|
61
|
+
Union[T, asyncio.Future]
|
|
62
|
+
The result of the coroutine if executed synchronously, or an asyncio.Future if scheduled
|
|
63
|
+
for asynchronous execution.
|
|
64
|
+
|
|
65
|
+
Raises
|
|
66
|
+
------
|
|
67
|
+
RuntimeError
|
|
68
|
+
If the coroutine cannot be executed due to event loop issues.
|
|
69
|
+
|
|
70
|
+
Notes
|
|
71
|
+
-----
|
|
72
|
+
- Executes synchronously if called outside an active event loop and returns the result.
|
|
73
|
+
- Schedules asynchronously if called within an active event loop and returns a Future.
|
|
74
|
+
- Automatically detects the execution context and chooses the appropriate strategy.
|
|
75
|
+
"""
|
|
76
|
+
# This method should be implemented by subclasses to handle coroutine execution logic.
|
|
77
|
+
pass
|
|
@@ -10,28 +10,25 @@ class Coroutine(ICoroutine):
|
|
|
10
10
|
|
|
11
11
|
def __init__(self, func: Union[TypingCoroutine[Any, Any, T], Callable[..., TypingCoroutine[Any, Any, T]]]) -> None:
|
|
12
12
|
"""
|
|
13
|
-
|
|
13
|
+
Initializes a Coroutine wrapper to manage and execute coroutine objects or functions.
|
|
14
14
|
|
|
15
|
-
This constructor accepts either a coroutine object
|
|
16
|
-
|
|
17
|
-
using the run() method with automatic context detection.
|
|
15
|
+
This constructor accepts either a coroutine object or a callable that returns a coroutine.
|
|
16
|
+
The wrapped coroutine or function can be executed later using the run() or invoke() methods.
|
|
18
17
|
|
|
19
18
|
Parameters
|
|
20
19
|
----------
|
|
21
20
|
func : Union[TypingCoroutine[Any, Any, T], Callable[..., TypingCoroutine[Any, Any, T]]]
|
|
22
|
-
The coroutine object
|
|
23
|
-
a coroutine. This will be stored internally for later execution.
|
|
21
|
+
The coroutine object or a callable that returns a coroutine to be managed.
|
|
24
22
|
|
|
25
23
|
Returns
|
|
26
24
|
-------
|
|
27
25
|
None
|
|
28
|
-
This
|
|
26
|
+
This method does not return any value.
|
|
29
27
|
|
|
30
28
|
Notes
|
|
31
29
|
-----
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
- Both coroutine objects and coroutine functions are accepted as valid input.
|
|
30
|
+
- Type validation is deferred until execution.
|
|
31
|
+
- Accepts both coroutine objects and coroutine functions.
|
|
35
32
|
"""
|
|
36
33
|
|
|
37
34
|
# Store the coroutine object or callable for later execution
|
|
@@ -39,11 +36,12 @@ class Coroutine(ICoroutine):
|
|
|
39
36
|
|
|
40
37
|
def invoke(self, *args, **kwargs) -> Union[T, asyncio.Task, None]:
|
|
41
38
|
"""
|
|
42
|
-
|
|
39
|
+
Invokes the callable coroutine function or regular function with the provided arguments.
|
|
43
40
|
|
|
44
|
-
This method executes a callable coroutine function or regular function
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
This method executes a callable coroutine function or a regular function using the given
|
|
42
|
+
positional and keyword arguments. It automatically detects whether the function is asynchronous
|
|
43
|
+
and adapts execution to the current event loop context. Exceptions are handled and wrapped
|
|
44
|
+
appropriately.
|
|
47
45
|
|
|
48
46
|
Parameters
|
|
49
47
|
----------
|
|
@@ -55,77 +53,67 @@ class Coroutine(ICoroutine):
|
|
|
55
53
|
Returns
|
|
56
54
|
-------
|
|
57
55
|
Union[T, asyncio.Task, None]
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
The result of the coroutine if executed synchronously,
|
|
57
|
+
an asyncio.Task if scheduled for asynchronous execution,
|
|
58
|
+
or the result of a regular callable.
|
|
61
59
|
|
|
62
60
|
Raises
|
|
63
61
|
------
|
|
64
62
|
OrionisCoroutineException
|
|
65
63
|
If an error occurs during coroutine execution.
|
|
66
64
|
RuntimeError
|
|
67
|
-
If an error occurs during callable execution
|
|
65
|
+
If an unexpected error occurs during callable execution.
|
|
68
66
|
|
|
69
67
|
Notes
|
|
70
68
|
-----
|
|
71
|
-
- Only callable objects can be invoked with this method
|
|
72
|
-
- For coroutine functions, execution context is automatically detected
|
|
73
|
-
- Non-coroutine callables are executed directly
|
|
74
|
-
- Exceptions are wrapped with appropriate context information
|
|
75
|
-
|
|
76
|
-
Examples
|
|
77
|
-
--------
|
|
78
|
-
>>> async def my_coro(x, y):
|
|
79
|
-
... return x + y
|
|
80
|
-
>>> coro = Coroutine(my_coro)
|
|
81
|
-
>>> result = coro.invoke(1, 2) # Returns Task or result depending on context
|
|
69
|
+
- Only callable objects can be invoked with this method.
|
|
70
|
+
- For coroutine functions, execution context is automatically detected.
|
|
71
|
+
- Non-coroutine callables are executed directly.
|
|
72
|
+
- Exceptions are wrapped with appropriate context information.
|
|
82
73
|
"""
|
|
74
|
+
|
|
75
|
+
# Ensure the stored object is callable before invocation
|
|
83
76
|
if not callable(self.__func):
|
|
84
77
|
raise OrionisCoroutineException(
|
|
85
78
|
f"Cannot invoke non-callable object of type {type(self.__func).__name__}"
|
|
86
79
|
)
|
|
87
80
|
|
|
88
81
|
try:
|
|
89
|
-
|
|
90
82
|
# Check if the callable is a coroutine function
|
|
91
83
|
if asyncio.iscoroutinefunction(self.__func):
|
|
92
84
|
|
|
93
|
-
# Create the coroutine object
|
|
85
|
+
# Create the coroutine object using provided arguments
|
|
94
86
|
coroutine_obj = self.__func(*args, **kwargs)
|
|
95
87
|
|
|
96
88
|
try:
|
|
97
|
-
|
|
98
|
-
# Check if we're inside a running event loop
|
|
89
|
+
# Attempt to get the currently running event loop
|
|
99
90
|
loop = asyncio.get_running_loop()
|
|
91
|
+
|
|
92
|
+
# Schedule the coroutine for asynchronous execution and return the Task
|
|
100
93
|
return loop.create_task(coroutine_obj)
|
|
101
94
|
|
|
102
95
|
except RuntimeError:
|
|
96
|
+
# No running event loop; execute the coroutine synchronously
|
|
103
97
|
|
|
104
|
-
# No running event loop, execute synchronously
|
|
105
98
|
try:
|
|
106
|
-
|
|
107
99
|
# Use asyncio.run to execute the coroutine and return its result
|
|
108
100
|
return asyncio.run(coroutine_obj)
|
|
109
101
|
|
|
110
102
|
except Exception as e:
|
|
111
|
-
|
|
112
|
-
# Wrap and raise any exceptions that occur during execution
|
|
103
|
+
# Wrap and raise any exceptions that occur during synchronous execution
|
|
113
104
|
raise OrionisCoroutineException(
|
|
114
105
|
f"Failed to execute coroutine synchronously: {str(e)}"
|
|
115
106
|
) from e
|
|
116
107
|
|
|
117
108
|
else:
|
|
118
|
-
|
|
119
|
-
# Execute regular callable directly
|
|
109
|
+
# Execute regular callable directly and return its result
|
|
120
110
|
return self.__func(*args, **kwargs)
|
|
121
111
|
|
|
122
112
|
except OrionisCoroutineException:
|
|
123
|
-
|
|
124
|
-
# Re-raise our custom exceptions as-is
|
|
113
|
+
# Re-raise custom exceptions as-is
|
|
125
114
|
raise
|
|
126
115
|
|
|
127
116
|
except Exception as e:
|
|
128
|
-
|
|
129
117
|
# Wrap and raise any other exceptions that occur during invocation
|
|
130
118
|
raise RuntimeError(
|
|
131
119
|
f"Unexpected error during callable invocation: {str(e)}"
|
|
@@ -133,15 +121,22 @@ class Coroutine(ICoroutine):
|
|
|
133
121
|
|
|
134
122
|
def run(self) -> Union[T, asyncio.Future]:
|
|
135
123
|
"""
|
|
136
|
-
Executes the wrapped coroutine, adapting to the current event loop context.
|
|
124
|
+
Executes the wrapped coroutine, adapting execution to the current event loop context.
|
|
125
|
+
|
|
126
|
+
This method determines whether to execute the coroutine synchronously or schedule it
|
|
127
|
+
for asynchronous execution based on the presence of an active event loop. It validates
|
|
128
|
+
that the stored object is a coroutine before execution.
|
|
137
129
|
|
|
138
130
|
Returns
|
|
139
131
|
-------
|
|
140
|
-
T
|
|
141
|
-
The result of the coroutine if executed synchronously, or an asyncio.Future if scheduled
|
|
132
|
+
Union[T, asyncio.Future]
|
|
133
|
+
The result of the coroutine if executed synchronously, or an asyncio.Future if scheduled
|
|
134
|
+
for asynchronous execution.
|
|
142
135
|
|
|
143
136
|
Raises
|
|
144
137
|
------
|
|
138
|
+
OrionisCoroutineException
|
|
139
|
+
If the stored object is not a coroutine.
|
|
145
140
|
RuntimeError
|
|
146
141
|
If the coroutine cannot be executed due to event loop issues.
|
|
147
142
|
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
from typing import Any, Dict
|
|
2
|
+
from abc import ABC, abstractmethod
|
|
3
|
+
|
|
4
|
+
class IEnv(ABC):
|
|
5
|
+
|
|
6
|
+
@classmethod
|
|
7
|
+
@abstractmethod
|
|
8
|
+
def get(cls, key: str, default: Any = None) -> Any:
|
|
9
|
+
"""
|
|
10
|
+
Retrieves the value of the specified environment variable.
|
|
11
|
+
|
|
12
|
+
Parameters
|
|
13
|
+
----------
|
|
14
|
+
key : str
|
|
15
|
+
The name of the environment variable to retrieve. Must be a valid
|
|
16
|
+
environment variable name (uppercase, numbers, underscores).
|
|
17
|
+
default : Any, optional
|
|
18
|
+
The value to return if the environment variable is not found.
|
|
19
|
+
Can be any type (str, int, bool, list, etc.). Defaults to None.
|
|
20
|
+
|
|
21
|
+
Returns
|
|
22
|
+
-------
|
|
23
|
+
Any
|
|
24
|
+
The value of the environment variable if it exists, automatically
|
|
25
|
+
parsed to its appropriate Python type (str, int, float, bool, list, dict, etc.),
|
|
26
|
+
otherwise the default value.
|
|
27
|
+
"""
|
|
28
|
+
pass
|
|
29
|
+
|
|
30
|
+
@classmethod
|
|
31
|
+
@abstractmethod
|
|
32
|
+
def set(cls, key: str, value: str, type: str = None) -> bool:
|
|
33
|
+
"""
|
|
34
|
+
Sets the value of an environment variable in the .env file.
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
key : str
|
|
39
|
+
The name of the environment variable to set. Must follow the pattern:
|
|
40
|
+
uppercase letters, numbers, and underscores only, starting with a letter.
|
|
41
|
+
Example: 'DATABASE_URL', 'MAX_CONNECTIONS', 'FEATURE_FLAGS'
|
|
42
|
+
value : str
|
|
43
|
+
The value to assign to the environment variable.
|
|
44
|
+
type : str, optional
|
|
45
|
+
Optional type hint for explicit type casting. Supported types:
|
|
46
|
+
- 'str': String values
|
|
47
|
+
- 'int': Integer values
|
|
48
|
+
- 'float': Floating-point values
|
|
49
|
+
- 'bool': Boolean values (true/false)
|
|
50
|
+
- 'list': List/array values
|
|
51
|
+
- 'dict': Dictionary/object values
|
|
52
|
+
- 'tuple': Tuple values
|
|
53
|
+
- 'set': Set values
|
|
54
|
+
- 'base64': Base64 encoded values
|
|
55
|
+
- 'path': File system path values
|
|
56
|
+
Defaults to None (automatic type detection).
|
|
57
|
+
|
|
58
|
+
Returns
|
|
59
|
+
-------
|
|
60
|
+
bool
|
|
61
|
+
True if the environment variable was set successfully, False otherwise.
|
|
62
|
+
"""
|
|
63
|
+
pass
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
@abstractmethod
|
|
67
|
+
def unset(cls, key: str) -> bool:
|
|
68
|
+
"""
|
|
69
|
+
Removes the specified environment variable from the .env file.
|
|
70
|
+
|
|
71
|
+
Parameters
|
|
72
|
+
----------
|
|
73
|
+
key : str
|
|
74
|
+
The name of the environment variable to remove.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
bool
|
|
79
|
+
True if the environment variable was removed successfully, False otherwise.
|
|
80
|
+
"""
|
|
81
|
+
pass
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
@abstractmethod
|
|
85
|
+
def all(cls) -> Dict[str, Any]:
|
|
86
|
+
"""
|
|
87
|
+
Retrieves all environment variables as a dictionary.
|
|
88
|
+
|
|
89
|
+
Returns
|
|
90
|
+
-------
|
|
91
|
+
dict of str to Any
|
|
92
|
+
A dictionary containing all environment variables loaded by DotEnv.
|
|
93
|
+
"""
|
|
94
|
+
pass
|
|
95
|
+
|
|
96
|
+
@classmethod
|
|
97
|
+
@abstractmethod
|
|
98
|
+
def reload(cls) -> bool:
|
|
99
|
+
"""
|
|
100
|
+
Reload environment variables from the .env file.
|
|
101
|
+
|
|
102
|
+
This method forces a refresh of all environment variables from the .env file,
|
|
103
|
+
useful when the file has been modified externally.
|
|
104
|
+
|
|
105
|
+
Returns
|
|
106
|
+
-------
|
|
107
|
+
bool
|
|
108
|
+
True if the reload was successful, False otherwise.
|
|
109
|
+
"""
|
|
110
|
+
pass
|
|
@@ -352,3 +352,45 @@ class DotEnv(metaclass=Singleton):
|
|
|
352
352
|
# Return the original string if parsing fails
|
|
353
353
|
except (ValueError, SyntaxError):
|
|
354
354
|
return value_str
|
|
355
|
+
|
|
356
|
+
def reload(self) -> bool:
|
|
357
|
+
"""
|
|
358
|
+
Reload environment variables from the `.env` file into the current process environment.
|
|
359
|
+
|
|
360
|
+
This method forces a refresh of all environment variables from the `.env` file,
|
|
361
|
+
which is useful when the file has been modified externally and the changes need to be
|
|
362
|
+
reflected in the running process.
|
|
363
|
+
|
|
364
|
+
Returns
|
|
365
|
+
-------
|
|
366
|
+
bool
|
|
367
|
+
Returns True if the environment variables were successfully reloaded from the `.env` file.
|
|
368
|
+
Raises OrionisEnvironmentException if an error occurs during the reload process.
|
|
369
|
+
|
|
370
|
+
Raises
|
|
371
|
+
------
|
|
372
|
+
OrionisEnvironmentException
|
|
373
|
+
If an error occurs while reloading environment variables from the `.env` file.
|
|
374
|
+
|
|
375
|
+
Notes
|
|
376
|
+
-----
|
|
377
|
+
Ensures thread safety during the reload operation by acquiring a lock.
|
|
378
|
+
Uses the `load_dotenv` function with `override=True` to update existing environment variables.
|
|
379
|
+
"""
|
|
380
|
+
try:
|
|
381
|
+
# Ensure thread-safe operation during the reload process
|
|
382
|
+
with self._lock:
|
|
383
|
+
|
|
384
|
+
# Reload environment variables from the .env file into the process environment,
|
|
385
|
+
# overriding any existing values in os.environ
|
|
386
|
+
load_dotenv(self.__resolved_path, override=True)
|
|
387
|
+
|
|
388
|
+
# Indicate successful operation
|
|
389
|
+
return True
|
|
390
|
+
|
|
391
|
+
except Exception as e:
|
|
392
|
+
|
|
393
|
+
# Raise a general error for any exceptions during reload
|
|
394
|
+
raise OrionisEnvironmentException(
|
|
395
|
+
f"An error occurred while reloading environment variables: {e}"
|
|
396
|
+
)
|
|
@@ -483,6 +483,8 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
483
483
|
"""
|
|
484
484
|
Converts the internal value to a string representation with the integer type hint prefix.
|
|
485
485
|
|
|
486
|
+
Now supports conversion from string values to integers for better usability.
|
|
487
|
+
|
|
486
488
|
Returns
|
|
487
489
|
-------
|
|
488
490
|
str
|
|
@@ -492,20 +494,33 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
492
494
|
Raises
|
|
493
495
|
------
|
|
494
496
|
OrionisEnvironmentValueError
|
|
495
|
-
If the internal value
|
|
497
|
+
If the internal value cannot be converted to an integer.
|
|
496
498
|
"""
|
|
497
499
|
|
|
498
|
-
#
|
|
499
|
-
if
|
|
500
|
+
# If the internal value is already an integer, use it directly
|
|
501
|
+
if isinstance(self.__value_raw, int):
|
|
502
|
+
return f"{self.__type_hint}:{str(self.__value_raw)}"
|
|
503
|
+
|
|
504
|
+
# If the internal value is a string, try to convert it to an integer
|
|
505
|
+
if isinstance(self.__value_raw, str):
|
|
506
|
+
try:
|
|
507
|
+
# Strip whitespace and attempt conversion
|
|
508
|
+
converted_value = int(self.__value_raw.strip())
|
|
509
|
+
return f"{self.__type_hint}:{str(converted_value)}"
|
|
510
|
+
except ValueError:
|
|
511
|
+
raise OrionisEnvironmentValueError(
|
|
512
|
+
f"Cannot convert string '{self.__value_raw}' to integer. Value must be a valid integer representation."
|
|
513
|
+
)
|
|
500
514
|
|
|
501
|
-
|
|
515
|
+
# For other types, try direct conversion
|
|
516
|
+
try:
|
|
517
|
+
converted_value = int(self.__value_raw)
|
|
518
|
+
return f"{self.__type_hint}:{str(converted_value)}"
|
|
519
|
+
except (ValueError, TypeError):
|
|
502
520
|
raise OrionisEnvironmentValueError(
|
|
503
|
-
f"Value must be
|
|
521
|
+
f"Value must be convertible to integer, got {type(self.__value_raw).__name__} with value '{self.__value_raw}'."
|
|
504
522
|
)
|
|
505
523
|
|
|
506
|
-
# Return the formatted string with type hint and integer value
|
|
507
|
-
return f"{self.__type_hint}:{str(self.__value_raw)}"
|
|
508
|
-
|
|
509
524
|
def __parseFloat(self):
|
|
510
525
|
"""
|
|
511
526
|
Convert the internal raw value to a float.
|
|
@@ -539,6 +554,8 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
539
554
|
"""
|
|
540
555
|
Converts the internal value to a string representation with the float type hint prefix.
|
|
541
556
|
|
|
557
|
+
Now supports conversion from string values to floats for better usability.
|
|
558
|
+
|
|
542
559
|
Returns
|
|
543
560
|
-------
|
|
544
561
|
str
|
|
@@ -548,20 +565,33 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
548
565
|
Raises
|
|
549
566
|
------
|
|
550
567
|
OrionisEnvironmentValueError
|
|
551
|
-
If the internal value
|
|
568
|
+
If the internal value cannot be converted to a float.
|
|
552
569
|
"""
|
|
553
570
|
|
|
554
|
-
#
|
|
555
|
-
if
|
|
571
|
+
# If the internal value is already a float, use it directly
|
|
572
|
+
if isinstance(self.__value_raw, float):
|
|
573
|
+
return f"{self.__type_hint}:{str(self.__value_raw)}"
|
|
574
|
+
|
|
575
|
+
# If the internal value is a string, try to convert it to a float
|
|
576
|
+
if isinstance(self.__value_raw, str):
|
|
577
|
+
try:
|
|
578
|
+
# Strip whitespace and attempt conversion
|
|
579
|
+
converted_value = float(self.__value_raw.strip())
|
|
580
|
+
return f"{self.__type_hint}:{str(converted_value)}"
|
|
581
|
+
except ValueError:
|
|
582
|
+
raise OrionisEnvironmentValueError(
|
|
583
|
+
f"Cannot convert string '{self.__value_raw}' to float. Value must be a valid floating-point representation."
|
|
584
|
+
)
|
|
556
585
|
|
|
557
|
-
|
|
586
|
+
# For other types (like int), try direct conversion
|
|
587
|
+
try:
|
|
588
|
+
converted_value = float(self.__value_raw)
|
|
589
|
+
return f"{self.__type_hint}:{str(converted_value)}"
|
|
590
|
+
except (ValueError, TypeError):
|
|
558
591
|
raise OrionisEnvironmentValueError(
|
|
559
|
-
f"Value must be
|
|
592
|
+
f"Value must be convertible to float, got {type(self.__value_raw).__name__} with value '{self.__value_raw}'."
|
|
560
593
|
)
|
|
561
594
|
|
|
562
|
-
# Return the formatted string with type hint and float value
|
|
563
|
-
return f"{self.__type_hint}:{str(self.__value_raw)}"
|
|
564
|
-
|
|
565
595
|
def __parseBool(self):
|
|
566
596
|
"""
|
|
567
597
|
Convert the internal raw value to a boolean.
|
|
@@ -601,6 +631,8 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
601
631
|
"""
|
|
602
632
|
Convert the internal value to a string representation with the boolean type hint prefix.
|
|
603
633
|
|
|
634
|
+
Now supports conversion from string values to booleans for better usability.
|
|
635
|
+
|
|
604
636
|
Returns
|
|
605
637
|
-------
|
|
606
638
|
str
|
|
@@ -610,20 +642,37 @@ class EnvironmentCaster(IEnvironmentCaster):
|
|
|
610
642
|
Raises
|
|
611
643
|
------
|
|
612
644
|
OrionisEnvironmentValueError
|
|
613
|
-
If the internal value
|
|
645
|
+
If the internal value cannot be converted to a boolean.
|
|
614
646
|
"""
|
|
615
647
|
|
|
616
|
-
#
|
|
617
|
-
if
|
|
648
|
+
# If the internal value is already a boolean, use it directly
|
|
649
|
+
if isinstance(self.__value_raw, bool):
|
|
650
|
+
return f"{self.__type_hint}:{str(self.__value_raw).lower()}"
|
|
618
651
|
|
|
619
|
-
|
|
652
|
+
# If the internal value is a string, try to convert it to a boolean
|
|
653
|
+
if isinstance(self.__value_raw, str):
|
|
654
|
+
# Strip whitespace and check common boolean representations
|
|
655
|
+
str_value = self.__value_raw.strip().lower()
|
|
656
|
+
|
|
657
|
+
if str_value in ('true', '1', 'yes', 'on', 'enabled'):
|
|
658
|
+
return f"{self.__type_hint}:true"
|
|
659
|
+
elif str_value in ('false', '0', 'no', 'off', 'disabled'):
|
|
660
|
+
return f"{self.__type_hint}:false"
|
|
661
|
+
else:
|
|
662
|
+
raise OrionisEnvironmentValueError(
|
|
663
|
+
f"Cannot convert string '{self.__value_raw}' to boolean. "
|
|
664
|
+
f"Valid representations: true/false, 1/0, yes/no, on/off, enabled/disabled."
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
# For other types, try direct conversion using Python's truthiness
|
|
668
|
+
try:
|
|
669
|
+
boolean_value = bool(self.__value_raw)
|
|
670
|
+
return f"{self.__type_hint}:{str(boolean_value).lower()}"
|
|
671
|
+
except Exception:
|
|
620
672
|
raise OrionisEnvironmentValueError(
|
|
621
|
-
f"Value must be
|
|
673
|
+
f"Value must be convertible to boolean, got {type(self.__value_raw).__name__} with value '{self.__value_raw}'."
|
|
622
674
|
)
|
|
623
675
|
|
|
624
|
-
# Return the formatted string with type hint and boolean value in lowercase
|
|
625
|
-
return f"{self.__type_hint}:{str(self.__value_raw).lower()}"
|
|
626
|
-
|
|
627
676
|
def __parseList(self):
|
|
628
677
|
"""
|
|
629
678
|
Parses the internal raw value and converts it to a Python list.
|