coaster icon indicating copy to clipboard operation
coaster copied to clipboard

Common patterns for Flask apps

Results 31 coaster issues
Sort by recently updated
recently updated
newest added

- [ ] class coaster.utils.NameTitle(name, title) - [ ] coaster.utils.deobfuscate_email(text) - [ ] coaster.utils.domain_namespace_match(domain, namespace) - [ ] coaster.utils.namespace_from_url(url) don't have an examples associated with them.

docs

Nested transactions are nice, but UPSERT is more reliable. `failsafe_add` should use it when it detects the underlying engine supports it. SQLAlchemy supports custom compilation for standard statements like INSERT...

coaster.sqlalchemy

In `coaster.sqlalchemy.JsonDict` [line 595](https://github.com/hasgeek/coaster/blob/399a59ddaeba2f36f53cd22f4b8fc3f59d8df557/coaster/sqlalchemy.py#L595), we use simplejson with `use_decimal=True` to parse non-integer numbers as `Decimal` instead of `float`. While this is a good idea because of the general unreliability of...

sanity
coaster.sqlalchemy

The `request_has_auth` helper function accompanying `current_auth` is meant to be used in an after_request processor to set a `Vary: Cookie` header if the request accessed `current_auth` in any way, implying...

updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.4 → v0.3.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.4...v0.3.5) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0)

Roles are currently defined as string-only. No other object type is accepted, and a role match is defined as a plain string match. However, roles are also scoped to a...

`RoleMixin.roles_for` is a method that returns a new instance of `LazyRoleSet` on each call. This has exposed an inefficiency with recursive calls in `ConditionalRole` introduced in #451. `RoleMixin.current_roles` meanwhile writes...

Registry members are added during module import, and the member signatures are affected by the `kwarg`, `property` and `cached_property` flags. This makes registries incompatible with static type checking. The member...

`requests` does not support Async, and does not appear it will gain support soon as there have been many abandoned forks and sub-projects over the years. We should move to...

StateManager is currently used as an instance of a reference `StateManager` that lives as a property on the model and sources its states from an external enum. This worked in...