flaxon 0.1.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.
- flaxon-0.1.0/.env.example +211 -0
- flaxon-0.1.0/CHANGELOG.md +36 -0
- flaxon-0.1.0/CODE_OF_CONDUCT.md +60 -0
- flaxon-0.1.0/CONTRIBUTING.md +139 -0
- flaxon-0.1.0/LICENSE +27 -0
- flaxon-0.1.0/MANIFEST.in +45 -0
- flaxon-0.1.0/PKG-INFO +245 -0
- flaxon-0.1.0/README.md +182 -0
- flaxon-0.1.0/ROADMAP.md +120 -0
- flaxon-0.1.0/SECURITY.md +80 -0
- flaxon-0.1.0/SUPPORT.md +81 -0
- flaxon-0.1.0/docs/api/application.md +0 -0
- flaxon-0.1.0/docs/api/http.md +0 -0
- flaxon-0.1.0/docs/api/jinax.md +0 -0
- flaxon-0.1.0/docs/api/routing.md +0 -0
- flaxon-0.1.0/docs/api/security.md +0 -0
- flaxon-0.1.0/docs/api/tasks.md +0 -0
- flaxon-0.1.0/docs/api/testing.md +0 -0
- flaxon-0.1.0/docs/api/validation.md +0 -0
- flaxon-0.1.0/docs/api/websocket.md +0 -0
- flaxon-0.1.0/docs/architecture.md +14 -0
- flaxon-0.1.0/docs/configuration.md +13 -0
- flaxon-0.1.0/docs/deployment.md +0 -0
- flaxon-0.1.0/docs/examples/android-backend.md +0 -0
- flaxon-0.1.0/docs/examples/basic-api.md +0 -0
- flaxon-0.1.0/docs/examples/jinax-website.md +0 -0
- flaxon-0.1.0/docs/examples/large-application.md +0 -0
- flaxon-0.1.0/docs/examples/react-backend.md +0 -0
- flaxon-0.1.0/docs/examples/websocket-chat.md +0 -0
- flaxon-0.1.0/docs/guides/authentication.md +0 -0
- flaxon-0.1.0/docs/guides/authorization.md +0 -0
- flaxon-0.1.0/docs/guides/databases.md +0 -0
- flaxon-0.1.0/docs/guides/debugging.md +0 -0
- flaxon-0.1.0/docs/guides/jinax.md +0 -0
- flaxon-0.1.0/docs/guides/middleware.md +0 -0
- flaxon-0.1.0/docs/guides/mobile-backends.md +0 -0
- flaxon-0.1.0/docs/guides/plugins.md +0 -0
- flaxon-0.1.0/docs/guides/requests.md +0 -0
- flaxon-0.1.0/docs/guides/responses.md +0 -0
- flaxon-0.1.0/docs/guides/routing.md +0 -0
- flaxon-0.1.0/docs/guides/tasks.md +0 -0
- flaxon-0.1.0/docs/guides/testing.md +0 -0
- flaxon-0.1.0/docs/guides/validation.md +0 -0
- flaxon-0.1.0/docs/guides/websockets.md +0 -0
- flaxon-0.1.0/docs/index.md +28 -0
- flaxon-0.1.0/docs/installation.md +24 -0
- flaxon-0.1.0/docs/migration-guide.md +0 -0
- flaxon-0.1.0/docs/performance.md +0 -0
- flaxon-0.1.0/docs/philosophy.md +0 -0
- flaxon-0.1.0/docs/quickstart.md +27 -0
- flaxon-0.1.0/docs/security.md +0 -0
- flaxon-0.1.0/pyproject.toml +322 -0
- flaxon-0.1.0/setup.cfg +4 -0
- flaxon-0.1.0/src/flaxon/__init__.py +76 -0
- flaxon-0.1.0/src/flaxon/__main__.py +15 -0
- flaxon-0.1.0/src/flaxon/application/__init__.py +49 -0
- flaxon-0.1.0/src/flaxon/application/app.py +173 -0
- flaxon-0.1.0/src/flaxon/application/bootstrap.py +205 -0
- flaxon-0.1.0/src/flaxon/application/configuration.py +128 -0
- flaxon-0.1.0/src/flaxon/application/context.py +136 -0
- flaxon-0.1.0/src/flaxon/application/environment.py +197 -0
- flaxon-0.1.0/src/flaxon/application/lifecycle.py +82 -0
- flaxon-0.1.0/src/flaxon/application/registry.py +164 -0
- flaxon-0.1.0/src/flaxon/application/state.py +61 -0
- flaxon-0.1.0/src/flaxon/asgi/__init__.py +26 -0
- flaxon-0.1.0/src/flaxon/asgi/application.py +77 -0
- flaxon-0.1.0/src/flaxon/asgi/http.py +94 -0
- flaxon-0.1.0/src/flaxon/asgi/lifespan.py +113 -0
- flaxon-0.1.0/src/flaxon/asgi/protocol.py +107 -0
- flaxon-0.1.0/src/flaxon/asgi/utils.py +225 -0
- flaxon-0.1.0/src/flaxon/asgi/websocket.py +76 -0
- flaxon-0.1.0/src/flaxon/caching/__init__.py +18 -0
- flaxon-0.1.0/src/flaxon/caching/backends/__init__.py +13 -0
- flaxon-0.1.0/src/flaxon/caching/backends/custom.py +109 -0
- flaxon-0.1.0/src/flaxon/caching/backends/filesystem.py +132 -0
- flaxon-0.1.0/src/flaxon/caching/backends/memory.py +131 -0
- flaxon-0.1.0/src/flaxon/caching/backends/redis.py +112 -0
- flaxon-0.1.0/src/flaxon/caching/cache.py +131 -0
- flaxon-0.1.0/src/flaxon/caching/decorators.py +138 -0
- flaxon-0.1.0/src/flaxon/caching/exceptions.py +29 -0
- flaxon-0.1.0/src/flaxon/caching/key_builder.py +94 -0
- flaxon-0.1.0/src/flaxon/cli/__init__.py +18 -0
- flaxon-0.1.0/src/flaxon/cli/commands/__init__.py +31 -0
- flaxon-0.1.0/src/flaxon/cli/commands/build.py +44 -0
- flaxon-0.1.0/src/flaxon/cli/commands/doctor.py +65 -0
- flaxon-0.1.0/src/flaxon/cli/commands/generate.py +50 -0
- flaxon-0.1.0/src/flaxon/cli/commands/inspect.py +63 -0
- flaxon-0.1.0/src/flaxon/cli/commands/migrate.py +36 -0
- flaxon-0.1.0/src/flaxon/cli/commands/new.py +54 -0
- flaxon-0.1.0/src/flaxon/cli/commands/routes.py +68 -0
- flaxon-0.1.0/src/flaxon/cli/commands/run.py +56 -0
- flaxon-0.1.0/src/flaxon/cli/commands/schedule.py +49 -0
- flaxon-0.1.0/src/flaxon/cli/commands/shell.py +40 -0
- flaxon-0.1.0/src/flaxon/cli/commands/test.py +47 -0
- flaxon-0.1.0/src/flaxon/cli/commands/version.py +37 -0
- flaxon-0.1.0/src/flaxon/cli/commands/worker.py +52 -0
- flaxon-0.1.0/src/flaxon/cli/commands.py +246 -0
- flaxon-0.1.0/src/flaxon/cli/console.py +79 -0
- flaxon-0.1.0/src/flaxon/cli/discovery.py +70 -0
- flaxon-0.1.0/src/flaxon/cli/generator.py +47 -0
- flaxon-0.1.0/src/flaxon/cli/main.py +53 -0
- flaxon-0.1.0/src/flaxon/cli/templates.py +215 -0
- flaxon-0.1.0/src/flaxon/constants.py +158 -0
- flaxon-0.1.0/src/flaxon/database/__init__.py +33 -0
- flaxon-0.1.0/src/flaxon/database/adapters/__init__.py +21 -0
- flaxon-0.1.0/src/flaxon/database/adapters/base.py +46 -0
- flaxon-0.1.0/src/flaxon/database/adapters/custom.py +85 -0
- flaxon-0.1.0/src/flaxon/database/adapters/mongodb.py +119 -0
- flaxon-0.1.0/src/flaxon/database/adapters/mysql.py +81 -0
- flaxon-0.1.0/src/flaxon/database/adapters/postgresql.py +73 -0
- flaxon-0.1.0/src/flaxon/database/adapters/redis.py +127 -0
- flaxon-0.1.0/src/flaxon/database/adapters/sqlalchemy.py +79 -0
- flaxon-0.1.0/src/flaxon/database/adapters/sqlite.py +69 -0
- flaxon-0.1.0/src/flaxon/database/connections.py +181 -0
- flaxon-0.1.0/src/flaxon/database/exceptions.py +45 -0
- flaxon-0.1.0/src/flaxon/database/health.py +76 -0
- flaxon-0.1.0/src/flaxon/database/manager.py +56 -0
- flaxon-0.1.0/src/flaxon/database/migrations.py +195 -0
- flaxon-0.1.0/src/flaxon/database/repositories.py +102 -0
- flaxon-0.1.0/src/flaxon/database/transactions.py +103 -0
- flaxon-0.1.0/src/flaxon/debugging/__init__.py +38 -0
- flaxon-0.1.0/src/flaxon/debugging/dashboard.py +135 -0
- flaxon-0.1.0/src/flaxon/debugging/debugger.py +109 -0
- flaxon-0.1.0/src/flaxon/debugging/error_codes.py +45 -0
- flaxon-0.1.0/src/flaxon/debugging/error_store.py +57 -0
- flaxon-0.1.0/src/flaxon/debugging/formatter.py +76 -0
- flaxon-0.1.0/src/flaxon/debugging/frames.py +86 -0
- flaxon-0.1.0/src/flaxon/debugging/inspector.py +82 -0
- flaxon-0.1.0/src/flaxon/debugging/production_errors.py +45 -0
- flaxon-0.1.0/src/flaxon/debugging/query_snapshot.py +66 -0
- flaxon-0.1.0/src/flaxon/debugging/redaction.py +95 -0
- flaxon-0.1.0/src/flaxon/debugging/report.py +76 -0
- flaxon-0.1.0/src/flaxon/debugging/request_snapshot.py +73 -0
- flaxon-0.1.0/src/flaxon/debugging/suggestions.py +101 -0
- flaxon-0.1.0/src/flaxon/debugging/traceback.py +77 -0
- flaxon-0.1.0/src/flaxon/debugging/websocket_snapshot.py +91 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/__init__.py +24 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/container.py +97 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/decorators.py +89 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/exceptions.py +34 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/provider.py +82 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/resolver.py +71 -0
- flaxon-0.1.0/src/flaxon/dependency_injection/scope.py +90 -0
- flaxon-0.1.0/src/flaxon/events/__init__.py +20 -0
- flaxon-0.1.0/src/flaxon/events/dispatcher.py +90 -0
- flaxon-0.1.0/src/flaxon/events/event.py +74 -0
- flaxon-0.1.0/src/flaxon/events/exceptions.py +29 -0
- flaxon-0.1.0/src/flaxon/events/listener.py +47 -0
- flaxon-0.1.0/src/flaxon/events/registry.py +52 -0
- flaxon-0.1.0/src/flaxon/events/subscriber.py +54 -0
- flaxon-0.1.0/src/flaxon/exceptions.py +69 -0
- flaxon-0.1.0/src/flaxon/files/__init__.py +14 -0
- flaxon-0.1.0/src/flaxon/files/adapters/__init__.py +11 -0
- flaxon-0.1.0/src/flaxon/files/adapters/custom.py +77 -0
- flaxon-0.1.0/src/flaxon/files/adapters/local.py +69 -0
- flaxon-0.1.0/src/flaxon/files/adapters/s3.py +129 -0
- flaxon-0.1.0/src/flaxon/files/storage.py +106 -0
- flaxon-0.1.0/src/flaxon/files/streaming.py +84 -0
- flaxon-0.1.0/src/flaxon/files/upload.py +173 -0
- flaxon-0.1.0/src/flaxon/files/validation.py +113 -0
- flaxon-0.1.0/src/flaxon/health/__init__.py +16 -0
- flaxon-0.1.0/src/flaxon/health/checks.py +185 -0
- flaxon-0.1.0/src/flaxon/health/probes.py +127 -0
- flaxon-0.1.0/src/flaxon/health/registry.py +64 -0
- flaxon-0.1.0/src/flaxon/health/response.py +102 -0
- flaxon-0.1.0/src/flaxon/http/__init__.py +20 -0
- flaxon-0.1.0/src/flaxon/http/body.py +255 -0
- flaxon-0.1.0/src/flaxon/http/content_types.py +267 -0
- flaxon-0.1.0/src/flaxon/http/cookies.py +67 -0
- flaxon-0.1.0/src/flaxon/http/exceptions.py +245 -0
- flaxon-0.1.0/src/flaxon/http/form.py +227 -0
- flaxon-0.1.0/src/flaxon/http/headers.py +37 -0
- flaxon-0.1.0/src/flaxon/http/json.py +233 -0
- flaxon-0.1.0/src/flaxon/http/middleware.py +94 -0
- flaxon-0.1.0/src/flaxon/http/query_params.py +28 -0
- flaxon-0.1.0/src/flaxon/http/redirects.py +242 -0
- flaxon-0.1.0/src/flaxon/http/request.py +56 -0
- flaxon-0.1.0/src/flaxon/http/response.py +93 -0
- flaxon-0.1.0/src/flaxon/http/status.py +93 -0
- flaxon-0.1.0/src/flaxon/http/streaming.py +232 -0
- flaxon-0.1.0/src/flaxon/http/uploads.py +294 -0
- flaxon-0.1.0/src/flaxon/jinax/__init__.py +7 -0
- flaxon-0.1.0/src/flaxon/jinax/ast.py +66 -0
- flaxon-0.1.0/src/flaxon/jinax/async_render.py +76 -0
- flaxon-0.1.0/src/flaxon/jinax/cache.py +87 -0
- flaxon-0.1.0/src/flaxon/jinax/compiler.py +112 -0
- flaxon-0.1.0/src/flaxon/jinax/components.py +55 -0
- flaxon-0.1.0/src/flaxon/jinax/context.py +81 -0
- flaxon-0.1.0/src/flaxon/jinax/diagnostics.py +91 -0
- flaxon-0.1.0/src/flaxon/jinax/directives.py +103 -0
- flaxon-0.1.0/src/flaxon/jinax/engine.py +67 -0
- flaxon-0.1.0/src/flaxon/jinax/environment.py +52 -0
- flaxon-0.1.0/src/flaxon/jinax/escaping.py +96 -0
- flaxon-0.1.0/src/flaxon/jinax/exceptions.py +67 -0
- flaxon-0.1.0/src/flaxon/jinax/expression.py +125 -0
- flaxon-0.1.0/src/flaxon/jinax/filters.py +0 -0
- flaxon-0.1.0/src/flaxon/jinax/functions.py +0 -0
- flaxon-0.1.0/src/flaxon/jinax/hot_reload.py +128 -0
- flaxon-0.1.0/src/flaxon/jinax/inheritance.py +58 -0
- flaxon-0.1.0/src/flaxon/jinax/lexer.py +132 -0
- flaxon-0.1.0/src/flaxon/jinax/loader.py +34 -0
- flaxon-0.1.0/src/flaxon/jinax/loaders/__init__.py +13 -0
- flaxon-0.1.0/src/flaxon/jinax/loaders/composite.py +55 -0
- flaxon-0.1.0/src/flaxon/jinax/loaders/dictionary.py +38 -0
- flaxon-0.1.0/src/flaxon/jinax/loaders/filesystem.py +53 -0
- flaxon-0.1.0/src/flaxon/jinax/loaders/package.py +61 -0
- flaxon-0.1.0/src/flaxon/jinax/macros.py +0 -0
- flaxon-0.1.0/src/flaxon/jinax/nodes.py +65 -0
- flaxon-0.1.0/src/flaxon/jinax/parser.py +37 -0
- flaxon-0.1.0/src/flaxon/jinax/runtime.py +38 -0
- flaxon-0.1.0/src/flaxon/jinax/sandbox.py +86 -0
- flaxon-0.1.0/src/flaxon/jinax/tokens.py +25 -0
- flaxon-0.1.0/src/flaxon/logging/__init__.py +57 -0
- flaxon-0.1.0/src/flaxon/logging/access.py +81 -0
- flaxon-0.1.0/src/flaxon/logging/audit.py +144 -0
- flaxon-0.1.0/src/flaxon/logging/configuration.py +98 -0
- flaxon-0.1.0/src/flaxon/logging/context.py +81 -0
- flaxon-0.1.0/src/flaxon/logging/filters.py +105 -0
- flaxon-0.1.0/src/flaxon/logging/formatters.py +98 -0
- flaxon-0.1.0/src/flaxon/logging/handlers.py +75 -0
- flaxon-0.1.0/src/flaxon/logging/json_logger.py +88 -0
- flaxon-0.1.0/src/flaxon/logging/logger.py +140 -0
- flaxon-0.1.0/src/flaxon/mail/__init__.py +15 -0
- flaxon-0.1.0/src/flaxon/mail/adapters/__init__.py +11 -0
- flaxon-0.1.0/src/flaxon/mail/adapters/console.py +44 -0
- flaxon-0.1.0/src/flaxon/mail/adapters/custom.py +16 -0
- flaxon-0.1.0/src/flaxon/mail/adapters/smtp.py +53 -0
- flaxon-0.1.0/src/flaxon/mail/mailer.py +34 -0
- flaxon-0.1.0/src/flaxon/mail/message.py +182 -0
- flaxon-0.1.0/src/flaxon/mail/templates.py +82 -0
- flaxon-0.1.0/src/flaxon/metrics/__init__.py +17 -0
- flaxon-0.1.0/src/flaxon/metrics/collector.py +122 -0
- flaxon-0.1.0/src/flaxon/metrics/counters.py +90 -0
- flaxon-0.1.0/src/flaxon/metrics/middleware.py +72 -0
- flaxon-0.1.0/src/flaxon/metrics/prometheus.py +70 -0
- flaxon-0.1.0/src/flaxon/metrics/timers.py +139 -0
- flaxon-0.1.0/src/flaxon/middleware/__init__.py +8 -0
- flaxon-0.1.0/src/flaxon/middleware/base.py +15 -0
- flaxon-0.1.0/src/flaxon/middleware/body_limit.py +58 -0
- flaxon-0.1.0/src/flaxon/middleware/compression.py +219 -0
- flaxon-0.1.0/src/flaxon/middleware/cors.py +42 -0
- flaxon-0.1.0/src/flaxon/middleware/logging.py +107 -0
- flaxon-0.1.0/src/flaxon/middleware/proxy_headers.py +133 -0
- flaxon-0.1.0/src/flaxon/middleware/recovery.py +111 -0
- flaxon-0.1.0/src/flaxon/middleware/request_id.py +29 -0
- flaxon-0.1.0/src/flaxon/middleware/security_headers.py +27 -0
- flaxon-0.1.0/src/flaxon/middleware/sessions.py +215 -0
- flaxon-0.1.0/src/flaxon/middleware/stack.py +155 -0
- flaxon-0.1.0/src/flaxon/middleware/timeout.py +52 -0
- flaxon-0.1.0/src/flaxon/middleware/trusted_hosts.py +85 -0
- flaxon-0.1.0/src/flaxon/openapi/__init__.py +22 -0
- flaxon-0.1.0/src/flaxon/openapi/documentation.py +68 -0
- flaxon-0.1.0/src/flaxon/openapi/examples.py +108 -0
- flaxon-0.1.0/src/flaxon/openapi/generator.py +89 -0
- flaxon-0.1.0/src/flaxon/openapi/operation.py +135 -0
- flaxon-0.1.0/src/flaxon/openapi/redoc.py +39 -0
- flaxon-0.1.0/src/flaxon/openapi/schema.py +154 -0
- flaxon-0.1.0/src/flaxon/openapi/swagger.py +48 -0
- flaxon-0.1.0/src/flaxon/plugins/__init__.py +22 -0
- flaxon-0.1.0/src/flaxon/plugins/discovery.py +98 -0
- flaxon-0.1.0/src/flaxon/plugins/exceptions.py +29 -0
- flaxon-0.1.0/src/flaxon/plugins/hooks.py +65 -0
- flaxon-0.1.0/src/flaxon/plugins/manager.py +87 -0
- flaxon-0.1.0/src/flaxon/plugins/plugin.py +63 -0
- flaxon-0.1.0/src/flaxon/plugins/registry.py +49 -0
- flaxon-0.1.0/src/flaxon/protocols.py +269 -0
- flaxon-0.1.0/src/flaxon/py.typed +0 -0
- flaxon-0.1.0/src/flaxon/routing/__init__.py +7 -0
- flaxon-0.1.0/src/flaxon/routing/converters.py +90 -0
- flaxon-0.1.0/src/flaxon/routing/dependency.py +318 -0
- flaxon-0.1.0/src/flaxon/routing/exceptions.py +139 -0
- flaxon-0.1.0/src/flaxon/routing/group.py +121 -0
- flaxon-0.1.0/src/flaxon/routing/mount.py +104 -0
- flaxon-0.1.0/src/flaxon/routing/parameters.py +136 -0
- flaxon-0.1.0/src/flaxon/routing/resolver.py +116 -0
- flaxon-0.1.0/src/flaxon/routing/reverse.py +142 -0
- flaxon-0.1.0/src/flaxon/routing/route.py +70 -0
- flaxon-0.1.0/src/flaxon/routing/router.py +98 -0
- flaxon-0.1.0/src/flaxon/routing/trie.py +162 -0
- flaxon-0.1.0/src/flaxon/security/__init__.py +98 -0
- flaxon-0.1.0/src/flaxon/security/api_keys.py +102 -0
- flaxon-0.1.0/src/flaxon/security/authentication.py +269 -0
- flaxon-0.1.0/src/flaxon/security/authorization.py +107 -0
- flaxon-0.1.0/src/flaxon/security/cors.py +96 -0
- flaxon-0.1.0/src/flaxon/security/csrf.py +91 -0
- flaxon-0.1.0/src/flaxon/security/encryption.py +78 -0
- flaxon-0.1.0/src/flaxon/security/exceptions.py +54 -0
- flaxon-0.1.0/src/flaxon/security/headers.py +56 -0
- flaxon-0.1.0/src/flaxon/security/jwt.py +100 -0
- flaxon-0.1.0/src/flaxon/security/oauth.py +90 -0
- flaxon-0.1.0/src/flaxon/security/password.py +113 -0
- flaxon-0.1.0/src/flaxon/security/permissions.py +106 -0
- flaxon-0.1.0/src/flaxon/security/rate_limit.py +162 -0
- flaxon-0.1.0/src/flaxon/security/roles.py +140 -0
- flaxon-0.1.0/src/flaxon/security/sanitization.py +78 -0
- flaxon-0.1.0/src/flaxon/security/secrets.py +59 -0
- flaxon-0.1.0/src/flaxon/security/sessions.py +193 -0
- flaxon-0.1.0/src/flaxon/serialization/__init__.py +19 -0
- flaxon-0.1.0/src/flaxon/serialization/decoder.py +47 -0
- flaxon-0.1.0/src/flaxon/serialization/encoder.py +47 -0
- flaxon-0.1.0/src/flaxon/serialization/json.py +52 -0
- flaxon-0.1.0/src/flaxon/serialization/msgpack.py +77 -0
- flaxon-0.1.0/src/flaxon/serialization/types.py +58 -0
- flaxon-0.1.0/src/flaxon/server/__init__.py +17 -0
- flaxon-0.1.0/src/flaxon/server/configuration.py +83 -0
- flaxon-0.1.0/src/flaxon/server/development.py +77 -0
- flaxon-0.1.0/src/flaxon/server/processes.py +87 -0
- flaxon-0.1.0/src/flaxon/server/production.py +61 -0
- flaxon-0.1.0/src/flaxon/server/reload.py +75 -0
- flaxon-0.1.0/src/flaxon/server/runner.py +66 -0
- flaxon-0.1.0/src/flaxon/sessions/__init__.py +13 -0
- flaxon-0.1.0/src/flaxon/sessions/backends/__init__.py +13 -0
- flaxon-0.1.0/src/flaxon/sessions/backends/database.py +104 -0
- flaxon-0.1.0/src/flaxon/sessions/backends/memory.py +82 -0
- flaxon-0.1.0/src/flaxon/sessions/backends/redis.py +87 -0
- flaxon-0.1.0/src/flaxon/sessions/backends/signed_cookie.py +72 -0
- flaxon-0.1.0/src/flaxon/sessions/cookie.py +116 -0
- flaxon-0.1.0/src/flaxon/sessions/manager.py +117 -0
- flaxon-0.1.0/src/flaxon/sessions/serializer.py +42 -0
- flaxon-0.1.0/src/flaxon/sessions/session.py +103 -0
- flaxon-0.1.0/src/flaxon/tasks/__init__.py +55 -0
- flaxon-0.1.0/src/flaxon/tasks/backends/__init__.py +13 -0
- flaxon-0.1.0/src/flaxon/tasks/backends/custom.py +116 -0
- flaxon-0.1.0/src/flaxon/tasks/backends/database.py +178 -0
- flaxon-0.1.0/src/flaxon/tasks/backends/memory.py +102 -0
- flaxon-0.1.0/src/flaxon/tasks/backends/redis.py +165 -0
- flaxon-0.1.0/src/flaxon/tasks/context.py +72 -0
- flaxon-0.1.0/src/flaxon/tasks/exceptions.py +39 -0
- flaxon-0.1.0/src/flaxon/tasks/queue.py +105 -0
- flaxon-0.1.0/src/flaxon/tasks/registry.py +51 -0
- flaxon-0.1.0/src/flaxon/tasks/result.py +61 -0
- flaxon-0.1.0/src/flaxon/tasks/retry.py +89 -0
- flaxon-0.1.0/src/flaxon/tasks/scheduler.py +97 -0
- flaxon-0.1.0/src/flaxon/tasks/serializer.py +105 -0
- flaxon-0.1.0/src/flaxon/tasks/signals.py +99 -0
- flaxon-0.1.0/src/flaxon/tasks/task.py +155 -0
- flaxon-0.1.0/src/flaxon/tasks/worker.py +106 -0
- flaxon-0.1.0/src/flaxon/testing/__init__.py +25 -0
- flaxon-0.1.0/src/flaxon/testing/application.py +46 -0
- flaxon-0.1.0/src/flaxon/testing/assertions.py +99 -0
- flaxon-0.1.0/src/flaxon/testing/client.py +163 -0
- flaxon-0.1.0/src/flaxon/testing/database.py +47 -0
- flaxon-0.1.0/src/flaxon/testing/factories.py +80 -0
- flaxon-0.1.0/src/flaxon/testing/fixtures.py +70 -0
- flaxon-0.1.0/src/flaxon/testing/mocks.py +62 -0
- flaxon-0.1.0/src/flaxon/testing/websocket_client.py +106 -0
- flaxon-0.1.0/src/flaxon/typing.py +237 -0
- flaxon-0.1.0/src/flaxon/utils/__init__.py +48 -0
- flaxon-0.1.0/src/flaxon/utils/collections.py +95 -0
- flaxon-0.1.0/src/flaxon/utils/concurrency.py +71 -0
- flaxon-0.1.0/src/flaxon/utils/dates.py +98 -0
- flaxon-0.1.0/src/flaxon/utils/deprecation.py +67 -0
- flaxon-0.1.0/src/flaxon/utils/encoding.py +65 -0
- flaxon-0.1.0/src/flaxon/utils/import_string.py +52 -0
- flaxon-0.1.0/src/flaxon/utils/inspection.py +74 -0
- flaxon-0.1.0/src/flaxon/utils/naming.py +0 -0
- flaxon-0.1.0/src/flaxon/utils/network.py +76 -0
- flaxon-0.1.0/src/flaxon/validation/__init__.py +140 -0
- flaxon-0.1.0/src/flaxon/validation/coercion.py +166 -0
- flaxon-0.1.0/src/flaxon/validation/decorators.py +191 -0
- flaxon-0.1.0/src/flaxon/validation/errors.py +38 -0
- flaxon-0.1.0/src/flaxon/validation/fields.py +361 -0
- flaxon-0.1.0/src/flaxon/validation/messages.py +66 -0
- flaxon-0.1.0/src/flaxon/validation/schema.py +76 -0
- flaxon-0.1.0/src/flaxon/validation/serializer.py +109 -0
- flaxon-0.1.0/src/flaxon/validation/validators.py +138 -0
- flaxon-0.1.0/src/flaxon/version.py +43 -0
- flaxon-0.1.0/src/flaxon/websocket/__init__.py +7 -0
- flaxon-0.1.0/src/flaxon/websocket/authentication.py +242 -0
- flaxon-0.1.0/src/flaxon/websocket/broadcaster.py +228 -0
- flaxon-0.1.0/src/flaxon/websocket/connection.py +97 -0
- flaxon-0.1.0/src/flaxon/websocket/events.py +282 -0
- flaxon-0.1.0/src/flaxon/websocket/exceptions.py +49 -0
- flaxon-0.1.0/src/flaxon/websocket/heartbeat.py +182 -0
- flaxon-0.1.0/src/flaxon/websocket/manager.py +32 -0
- flaxon-0.1.0/src/flaxon/websocket/message.py +129 -0
- flaxon-0.1.0/src/flaxon/websocket/redis_backend.py +194 -0
- flaxon-0.1.0/src/flaxon/websocket/rooms.py +245 -0
- flaxon-0.1.0/src/flaxon.egg-info/PKG-INFO +245 -0
- flaxon-0.1.0/src/flaxon.egg-info/SOURCES.txt +406 -0
- flaxon-0.1.0/src/flaxon.egg-info/dependency_links.txt +1 -0
- flaxon-0.1.0/src/flaxon.egg-info/entry_points.txt +2 -0
- flaxon-0.1.0/src/flaxon.egg-info/requires.txt +42 -0
- flaxon-0.1.0/src/flaxon.egg-info/top_level.txt +1 -0
- flaxon-0.1.0/tests/compatibility/test_optional_dependencies.py +115 -0
- flaxon-0.1.0/tests/compatibility/test_python_311.py +93 -0
- flaxon-0.1.0/tests/compatibility/test_python_312.py +103 -0
- flaxon-0.1.0/tests/compatibility/test_python_313.py +96 -0
- flaxon-0.1.0/tests/conftest.py +262 -0
- flaxon-0.1.0/tests/integration/test_authentication.py +142 -0
- flaxon-0.1.0/tests/integration/test_database_transactions.py +128 -0
- flaxon-0.1.0/tests/integration/test_http_lifecycle.py +166 -0
- flaxon-0.1.0/tests/integration/test_jinax_rendering.py +132 -0
- flaxon-0.1.0/tests/integration/test_middleware_stack.py +137 -0
- flaxon-0.1.0/tests/integration/test_plugin_loading.py +118 -0
- flaxon-0.1.0/tests/integration/test_task_worker.py +133 -0
- flaxon-0.1.0/tests/integration/test_websocket_lifecycle.py +172 -0
- flaxon-0.1.0/tests/performance/test_jinax_render_speed.py +191 -0
- flaxon-0.1.0/tests/performance/test_json_response.py +165 -0
- flaxon-0.1.0/tests/performance/test_middleware_overhead.py +139 -0
- flaxon-0.1.0/tests/performance/test_router_speed.py +136 -0
- flaxon-0.1.0/tests/performance/test_websocket_connections.py +145 -0
- flaxon-0.1.0/tests/security/test_csrf.py +139 -0
- flaxon-0.1.0/tests/security/test_jwt_validation.py +95 -0
- flaxon-0.1.0/tests/security/test_rate_limiting.py +133 -0
- flaxon-0.1.0/tests/security/test_secret_redaction.py +119 -0
- flaxon-0.1.0/tests/security/test_template_sandbox.py +113 -0
- flaxon-0.1.0/tests/security/test_xss_escaping.py +106 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# ============================================================
|
|
2
|
+
# Flaxon Framework Environment Variables
|
|
3
|
+
# ============================================================
|
|
4
|
+
# Copy this file to .env and update the values for your environment
|
|
5
|
+
# Never commit .env to version control!
|
|
6
|
+
# ============================================================
|
|
7
|
+
|
|
8
|
+
# ============================================================
|
|
9
|
+
# Application Settings
|
|
10
|
+
# ============================================================
|
|
11
|
+
|
|
12
|
+
# Environment: development, testing, staging, production
|
|
13
|
+
FLAXON_ENV=development
|
|
14
|
+
|
|
15
|
+
# Debug mode: true or false
|
|
16
|
+
FLAXON_DEBUG=true
|
|
17
|
+
|
|
18
|
+
# Secret key for sessions and cryptographic operations
|
|
19
|
+
# Generate with: python -c "import secrets; print(secrets.token_urlsafe(32))"
|
|
20
|
+
FLAXON_SECRET_KEY=change-this-to-a-secure-random-string-in-production
|
|
21
|
+
|
|
22
|
+
# Allowed hosts: comma-separated list
|
|
23
|
+
FLAXON_ALLOWED_HOSTS=localhost,127.0.0.1
|
|
24
|
+
|
|
25
|
+
# Maximum request body size in bytes (default: 10MB)
|
|
26
|
+
FLAXON_MAX_BODY_SIZE=10485760
|
|
27
|
+
|
|
28
|
+
# ============================================================
|
|
29
|
+
# Database Settings (example with PostgreSQL)
|
|
30
|
+
# ============================================================
|
|
31
|
+
|
|
32
|
+
DATABASE_URL=postgresql://user:password@localhost:5432/flaxon
|
|
33
|
+
DATABASE_POOL_SIZE=10
|
|
34
|
+
DATABASE_MAX_OVERFLOW=20
|
|
35
|
+
DATABASE_POOL_TIMEOUT=30
|
|
36
|
+
DATABASE_ECHO=false
|
|
37
|
+
|
|
38
|
+
# ============================================================
|
|
39
|
+
# Redis Settings
|
|
40
|
+
# ============================================================
|
|
41
|
+
|
|
42
|
+
REDIS_URL=redis://localhost:6379/0
|
|
43
|
+
REDIS_MAX_CONNECTIONS=10
|
|
44
|
+
REDIS_SOCKET_TIMEOUT=5
|
|
45
|
+
|
|
46
|
+
# ============================================================
|
|
47
|
+
# Cache Settings
|
|
48
|
+
# ============================================================
|
|
49
|
+
|
|
50
|
+
CACHE_BACKEND=memory # memory, redis, filesystem
|
|
51
|
+
CACHE_DEFAULT_TTL=300 # seconds
|
|
52
|
+
CACHE_MAX_SIZE=1000 # items (for memory backend)
|
|
53
|
+
|
|
54
|
+
# ============================================================
|
|
55
|
+
# Security Settings
|
|
56
|
+
# ============================================================
|
|
57
|
+
|
|
58
|
+
# CORS
|
|
59
|
+
CORS_ALLOWED_ORIGINS=https://example.com,https://app.example.com
|
|
60
|
+
CORS_ALLOW_CREDENTIALS=true
|
|
61
|
+
CORS_MAX_AGE=600
|
|
62
|
+
|
|
63
|
+
# Rate Limiting
|
|
64
|
+
RATE_LIMIT_REQUESTS=120
|
|
65
|
+
RATE_LIMIT_WINDOW=60 # seconds
|
|
66
|
+
|
|
67
|
+
# Session
|
|
68
|
+
SESSION_COOKIE_NAME=flaxon_session
|
|
69
|
+
SESSION_COOKIE_SECURE=true
|
|
70
|
+
SESSION_COOKIE_HTTPONLY=true
|
|
71
|
+
SESSION_COOKIE_SAMESITE=lax
|
|
72
|
+
SESSION_TTL=86400 # 24 hours in seconds
|
|
73
|
+
|
|
74
|
+
# ============================================================
|
|
75
|
+
# Email Settings (SMTP)
|
|
76
|
+
# ============================================================
|
|
77
|
+
|
|
78
|
+
SMTP_HOST=smtp.example.com
|
|
79
|
+
SMTP_PORT=587
|
|
80
|
+
SMTP_USERNAME=user@example.com
|
|
81
|
+
SMTP_PASSWORD=your-password
|
|
82
|
+
SMTP_USE_TLS=true
|
|
83
|
+
SMTP_FROM=noreply@example.com
|
|
84
|
+
|
|
85
|
+
# ============================================================
|
|
86
|
+
# Logging
|
|
87
|
+
# ============================================================
|
|
88
|
+
|
|
89
|
+
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
90
|
+
LOG_FORMAT=json # json, text
|
|
91
|
+
LOG_FILE=/var/log/flaxon/app.log
|
|
92
|
+
|
|
93
|
+
# ============================================================
|
|
94
|
+
# Observability
|
|
95
|
+
# ============================================================
|
|
96
|
+
|
|
97
|
+
# OpenTelemetry
|
|
98
|
+
OTEL_ENABLED=false
|
|
99
|
+
OTEL_SERVICE_NAME=flaxon
|
|
100
|
+
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
|
|
101
|
+
OTEL_TRACES_SAMPLER=parentbased_always_on
|
|
102
|
+
|
|
103
|
+
# ============================================================
|
|
104
|
+
# Performance
|
|
105
|
+
# ============================================================
|
|
106
|
+
|
|
107
|
+
# Worker count (for production)
|
|
108
|
+
WORKERS=4
|
|
109
|
+
|
|
110
|
+
# Timeouts (seconds)
|
|
111
|
+
READ_TIMEOUT=30
|
|
112
|
+
WRITE_TIMEOUT=30
|
|
113
|
+
CONNECT_TIMEOUT=5
|
|
114
|
+
|
|
115
|
+
# ============================================================
|
|
116
|
+
# Third-Party Services
|
|
117
|
+
# ============================================================
|
|
118
|
+
|
|
119
|
+
# Example: AWS S3
|
|
120
|
+
AWS_ACCESS_KEY_ID=your-access-key
|
|
121
|
+
AWS_SECRET_ACCESS_KEY=your-secret-key
|
|
122
|
+
AWS_REGION=us-east-1
|
|
123
|
+
AWS_S3_BUCKET=flaxon-storage
|
|
124
|
+
|
|
125
|
+
# Example: Firebase Cloud Messaging
|
|
126
|
+
FCM_API_KEY=your-fcm-api-key
|
|
127
|
+
FCM_SENDER_ID=your-sender-id
|
|
128
|
+
|
|
129
|
+
# Example: Sentry
|
|
130
|
+
SENTRY_DSN=https://your-dsn@sentry.example.com/1
|
|
131
|
+
SENTRY_ENVIRONMENT=development
|
|
132
|
+
SENTRY_SAMPLE_RATE=1.0
|
|
133
|
+
|
|
134
|
+
# ============================================================
|
|
135
|
+
# Development Settings
|
|
136
|
+
# ============================================================
|
|
137
|
+
|
|
138
|
+
# Auto-reload (development only)
|
|
139
|
+
AUTO_RELOAD=true
|
|
140
|
+
|
|
141
|
+
# Development server host
|
|
142
|
+
DEV_HOST=127.0.0.1
|
|
143
|
+
DEV_PORT=8000
|
|
144
|
+
|
|
145
|
+
# ============================================================
|
|
146
|
+
# Feature Flags
|
|
147
|
+
# ============================================================
|
|
148
|
+
|
|
149
|
+
FEATURE_WEBSOCKET_ENABLED=true
|
|
150
|
+
FEATURE_TASKS_ENABLED=false
|
|
151
|
+
FEATURE_OPENAPI_ENABLED=false
|
|
152
|
+
FEATURE_ADMIN_ENABLED=false
|
|
153
|
+
|
|
154
|
+
# ============================================================
|
|
155
|
+
# Security Policies (Production)
|
|
156
|
+
# ============================================================
|
|
157
|
+
|
|
158
|
+
SECURITY_HEADERS_ENABLED=true
|
|
159
|
+
CSP_ENABLED=false
|
|
160
|
+
CSP_POLICY="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self';"
|
|
161
|
+
|
|
162
|
+
HSTS_ENABLED=false
|
|
163
|
+
HSTS_MAX_AGE=31536000
|
|
164
|
+
HSTS_INCLUDE_SUBDOMAINS=true
|
|
165
|
+
HSTS_PRELOAD=false
|
|
166
|
+
|
|
167
|
+
# ============================================================
|
|
168
|
+
# Database Migration (if using Alembic)
|
|
169
|
+
# ============================================================
|
|
170
|
+
|
|
171
|
+
ALEMBIC_CONFIG=alembic.ini
|
|
172
|
+
ALEMBIC_SCRIPT_LOCATION=migrations
|
|
173
|
+
ALEMBIC_USE_ASYNC=true
|
|
174
|
+
|
|
175
|
+
# ============================================================
|
|
176
|
+
# JWT Authentication
|
|
177
|
+
# ============================================================
|
|
178
|
+
|
|
179
|
+
JWT_SECRET_KEY=change-this-to-a-secure-random-string
|
|
180
|
+
JWT_ALGORITHM=HS256
|
|
181
|
+
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=15
|
|
182
|
+
JWT_REFRESH_TOKEN_EXPIRE_DAYS=7
|
|
183
|
+
JWT_TOKEN_TYPE=bearer
|
|
184
|
+
|
|
185
|
+
# ============================================================
|
|
186
|
+
# OAuth2 Providers
|
|
187
|
+
# ============================================================
|
|
188
|
+
|
|
189
|
+
GOOGLE_CLIENT_ID=your-google-client-id
|
|
190
|
+
GOOGLE_CLIENT_SECRET=your-google-client-secret
|
|
191
|
+
GOOGLE_REDIRECT_URI=https://example.com/auth/google/callback
|
|
192
|
+
|
|
193
|
+
GITHUB_CLIENT_ID=your-github-client-id
|
|
194
|
+
GITHUB_CLIENT_SECRET=your-github-client-secret
|
|
195
|
+
GITHUB_REDIRECT_URI=https://example.com/auth/github/callback
|
|
196
|
+
|
|
197
|
+
# ============================================================
|
|
198
|
+
# File Storage
|
|
199
|
+
# ============================================================
|
|
200
|
+
|
|
201
|
+
STORAGE_BACKEND=local # local, s3, gcs, azure
|
|
202
|
+
STORAGE_LOCAL_PATH=./uploads
|
|
203
|
+
STORAGE_URL_PREFIX=/uploads
|
|
204
|
+
|
|
205
|
+
# S3 (if using)
|
|
206
|
+
S3_ENDPOINT_URL=https://s3.amazonaws.com
|
|
207
|
+
S3_ACCESS_KEY_ID=your-access-key
|
|
208
|
+
S3_SECRET_ACCESS_KEY=your-secret-key
|
|
209
|
+
S3_BUCKET_NAME=flaxon-storage
|
|
210
|
+
S3_REGION=us-east-1
|
|
211
|
+
S3_PUBLIC_URL=https://s3.amazonaws.com/flaxon-storage
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Flaxon will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial project structure
|
|
12
|
+
- ASGI application with HTTP, WebSocket, and lifespan support
|
|
13
|
+
- Flask-style route decorators with typed parameters
|
|
14
|
+
- Request validation with declarative schemas
|
|
15
|
+
- WebSocket support with room broadcasting
|
|
16
|
+
- Jinax template integration (optional Jinja2)
|
|
17
|
+
- Middleware: CORS, request ID, security headers, rate limiting
|
|
18
|
+
- CLI commands: run, routes, doctor, new
|
|
19
|
+
- Testing utilities: sync and async test clients
|
|
20
|
+
- Debugger with development/production modes
|
|
21
|
+
- Sensitive data redaction
|
|
22
|
+
|
|
23
|
+
## [0.1.0] - 2026-07-22
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
- Initial alpha release
|
|
27
|
+
- Core framework prototype
|
|
28
|
+
- Example applications: hello_api, jinax_site, react_backend, android_backend
|
|
29
|
+
- Comprehensive documentation
|
|
30
|
+
|
|
31
|
+
### Known Limitations
|
|
32
|
+
- WebSocket manager is in-memory only (single-process)
|
|
33
|
+
- Rate limiter is in-memory only (single-process)
|
|
34
|
+
- No OpenAPI generation yet
|
|
35
|
+
- No official plugin system yet
|
|
36
|
+
- No authentication/authorization modules yet
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## CODE_OF_CONDUCT.md
|
|
5
|
+
|
|
6
|
+
```markdown
|
|
7
|
+
# Code of Conduct
|
|
8
|
+
|
|
9
|
+
## Our Pledge
|
|
10
|
+
|
|
11
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
12
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
13
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
14
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
15
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
16
|
+
and orientation.
|
|
17
|
+
|
|
18
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
19
|
+
diverse, inclusive, and healthy community.
|
|
20
|
+
|
|
21
|
+
## Our Standards
|
|
22
|
+
|
|
23
|
+
Examples of behavior that contributes to a positive environment:
|
|
24
|
+
|
|
25
|
+
- Demonstrating empathy and kindness toward other people
|
|
26
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
27
|
+
- Giving and gracefully accepting constructive feedback
|
|
28
|
+
- Accepting responsibility and apologizing to those affected by our mistakes
|
|
29
|
+
- Focusing on what is best for the overall community
|
|
30
|
+
|
|
31
|
+
Examples of unacceptable behavior:
|
|
32
|
+
|
|
33
|
+
- The use of sexualized language or imagery, and sexual attention or advances
|
|
34
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
35
|
+
- Public or private harassment
|
|
36
|
+
- Publishing others' private information without explicit permission
|
|
37
|
+
- Other conduct which could reasonably be considered inappropriate
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Project maintainers are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior they deem inappropriate, threatening, offensive, or harmful.
|
|
44
|
+
|
|
45
|
+
## Scope
|
|
46
|
+
|
|
47
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
48
|
+
an individual is officially representing the community in public spaces.
|
|
49
|
+
|
|
50
|
+
## Enforcement
|
|
51
|
+
|
|
52
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
53
|
+
reported to the project team at conduct@flaxon.dev. All complaints will be
|
|
54
|
+
reviewed and investigated promptly and fairly.
|
|
55
|
+
|
|
56
|
+
## Attribution
|
|
57
|
+
|
|
58
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
59
|
+
version 2.1, available at
|
|
60
|
+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Contributing to Flaxon
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to Flaxon! 🎉
|
|
4
|
+
|
|
5
|
+
## Code of Conduct
|
|
6
|
+
|
|
7
|
+
By participating in this project, you agree to abide by our [Code of Conduct](CODE_OF_CONDUCT.md).
|
|
8
|
+
|
|
9
|
+
## How to Contribute
|
|
10
|
+
|
|
11
|
+
### Report a Bug
|
|
12
|
+
|
|
13
|
+
1. Check if the bug is already reported in [Issues](https://github.com/flaxon/flaxon/issues)
|
|
14
|
+
2. If not, create a new issue with:
|
|
15
|
+
- Clear title and description
|
|
16
|
+
- Steps to reproduce
|
|
17
|
+
- Expected vs actual behavior
|
|
18
|
+
- Environment (OS, Python version, Flaxon version)
|
|
19
|
+
|
|
20
|
+
### Suggest a Feature
|
|
21
|
+
|
|
22
|
+
1. Check if the feature is already requested
|
|
23
|
+
2. Create a feature request with:
|
|
24
|
+
- Clear description of the feature
|
|
25
|
+
- Why it's valuable
|
|
26
|
+
- Potential implementation approach
|
|
27
|
+
|
|
28
|
+
### Submit Code
|
|
29
|
+
|
|
30
|
+
1. Fork the repository
|
|
31
|
+
2. Create a feature branch: `git checkout -b feature/your-feature`
|
|
32
|
+
3. Make your changes with tests
|
|
33
|
+
4. Run the test suite: `pytest`
|
|
34
|
+
5. Run linting: `ruff check .`
|
|
35
|
+
6. Run type checking: `mypy .`
|
|
36
|
+
7. Commit with clear messages
|
|
37
|
+
8. Push and open a Pull Request
|
|
38
|
+
|
|
39
|
+
## Development Setup
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Clone the repository
|
|
43
|
+
git clone https://github.com/flaxon/flaxon.git
|
|
44
|
+
cd flaxon
|
|
45
|
+
|
|
46
|
+
# Create a virtual environment
|
|
47
|
+
python -m venv .venv
|
|
48
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
49
|
+
|
|
50
|
+
# Install in development mode with all extras
|
|
51
|
+
pip install -e ".[standard,dev]"
|
|
52
|
+
|
|
53
|
+
# Run tests
|
|
54
|
+
pytest
|
|
55
|
+
|
|
56
|
+
# Run tests with coverage
|
|
57
|
+
pytest --cov=flaxon --cov-report=term-missing
|
|
58
|
+
|
|
59
|
+
# Run linting
|
|
60
|
+
ruff check .
|
|
61
|
+
|
|
62
|
+
# Run type checking
|
|
63
|
+
mypy .
|
|
64
|
+
|
|
65
|
+
Code Style
|
|
66
|
+
Follow PEP 8
|
|
67
|
+
|
|
68
|
+
Use type hints for all function signatures
|
|
69
|
+
|
|
70
|
+
Write docstrings for public APIs
|
|
71
|
+
|
|
72
|
+
Keep functions focused and small
|
|
73
|
+
|
|
74
|
+
Prefer async/await for I/O operations
|
|
75
|
+
|
|
76
|
+
Linting Configuration
|
|
77
|
+
Flaxon uses ruff for linting and formatting. Configuration is in ruff.toml.
|
|
78
|
+
|
|
79
|
+
Type Checking
|
|
80
|
+
Flaxon uses mypy for static type checking. Configuration is in mypy.ini.
|
|
81
|
+
|
|
82
|
+
Testing
|
|
83
|
+
Unit tests in tests/unit/ — Test individual components
|
|
84
|
+
|
|
85
|
+
Integration tests in tests/integration/ — Test component interactions
|
|
86
|
+
|
|
87
|
+
Security tests in tests/security/ — Test security properties
|
|
88
|
+
|
|
89
|
+
Performance tests in tests/performance/ — Benchmark performance
|
|
90
|
+
|
|
91
|
+
Writing Tests
|
|
92
|
+
python
|
|
93
|
+
# tests/unit/test_example.py
|
|
94
|
+
from flaxon import Flaxon
|
|
95
|
+
from flaxon.testing import TestClient
|
|
96
|
+
|
|
97
|
+
def test_route():
|
|
98
|
+
app = Flaxon("test")
|
|
99
|
+
|
|
100
|
+
@app.get("/")
|
|
101
|
+
async def home():
|
|
102
|
+
return {"message": "hello"}
|
|
103
|
+
|
|
104
|
+
response = TestClient(app).get("/")
|
|
105
|
+
assert response.status_code == 200
|
|
106
|
+
assert response.json() == {"message": "hello"}
|
|
107
|
+
Pull Request Process
|
|
108
|
+
Update the CHANGELOG.md with your changes
|
|
109
|
+
|
|
110
|
+
Update documentation if necessary
|
|
111
|
+
|
|
112
|
+
Ensure all tests pass
|
|
113
|
+
|
|
114
|
+
Get at least one maintainer review
|
|
115
|
+
|
|
116
|
+
Squash commits before merging
|
|
117
|
+
|
|
118
|
+
Release Process
|
|
119
|
+
Update version in src/flaxon/__init__.py
|
|
120
|
+
|
|
121
|
+
Update CHANGELOG.md
|
|
122
|
+
|
|
123
|
+
Tag the release: git tag v0.1.0
|
|
124
|
+
|
|
125
|
+
Push tags: git push --tags
|
|
126
|
+
|
|
127
|
+
GitHub Actions will build and publish to PyPI
|
|
128
|
+
|
|
129
|
+
Maintainers
|
|
130
|
+
Aldane Hutchinson (@aldane)
|
|
131
|
+
|
|
132
|
+
Questions?
|
|
133
|
+
Open an issue for bugs or feature requests
|
|
134
|
+
|
|
135
|
+
Join our Discord for community support
|
|
136
|
+
|
|
137
|
+
Email: maintainers@flaxon.dev
|
|
138
|
+
|
|
139
|
+
Thank you for contributing to Flaxon! 🚀
|
flaxon-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
---
|
|
3
|
+
|
|
4
|
+
## LICENSE
|
|
5
|
+
|
|
6
|
+
```markdown
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 Aldane Hutchinson and Flaxon Contributors
|
|
10
|
+
|
|
11
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions:
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
flaxon-0.1.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Include all Python source files
|
|
2
|
+
include pyproject.toml
|
|
3
|
+
include README.md
|
|
4
|
+
include LICENSE
|
|
5
|
+
include CHANGELOG.md
|
|
6
|
+
include CONTRIBUTING.md
|
|
7
|
+
include CODE_OF_CONDUCT.md
|
|
8
|
+
include SECURITY.md
|
|
9
|
+
include SUPPORT.md
|
|
10
|
+
include ROADMAP.md
|
|
11
|
+
include .env.example
|
|
12
|
+
|
|
13
|
+
# Include package data
|
|
14
|
+
recursive-include src/flaxon *.py
|
|
15
|
+
recursive-include tests *.py
|
|
16
|
+
|
|
17
|
+
# Include examples
|
|
18
|
+
recursive-include examples *.py
|
|
19
|
+
recursive-include examples *.html
|
|
20
|
+
recursive-include examples *.json
|
|
21
|
+
recursive-include examples *.md
|
|
22
|
+
|
|
23
|
+
# Include documentation
|
|
24
|
+
recursive-include docs *.md
|
|
25
|
+
recursive-include docs *.rst
|
|
26
|
+
recursive-include docs *.png
|
|
27
|
+
recursive-include docs *.svg
|
|
28
|
+
|
|
29
|
+
# Include static assets if any
|
|
30
|
+
recursive-include src/flaxon/py.typed
|
|
31
|
+
|
|
32
|
+
# Exclude unnecessary files
|
|
33
|
+
global-exclude *.pyc
|
|
34
|
+
global-exclude *.pyo
|
|
35
|
+
global-exclude __pycache__
|
|
36
|
+
global-exclude .git
|
|
37
|
+
global-exclude .github
|
|
38
|
+
global-exclude .venv
|
|
39
|
+
global-exclude .pytest_cache
|
|
40
|
+
global-exclude .mypy_cache
|
|
41
|
+
global-exclude .ruff_cache
|
|
42
|
+
global-exclude .coverage
|
|
43
|
+
global-exclude *.log
|
|
44
|
+
global-exclude .DS_Store
|
|
45
|
+
global-exclude *.egg-info
|