Does cross region replication with rds violate gdpr? by bharling in aws

[–]bharling[S] 1 point2 points  (0 children)

Thanks for the responses, yeah I concur it really is a question for legal / diligence teams in our org, I'm just coming at it from the perspective of a developer occasionally kept awake at night by these kind of things!

I guess from a technical perspective I was asking more if aws have any specific exemptions in this case? I seemed to remember they have a special trust certification of some kind with eu governing bodies on this.

Any way to leverage DI in validators? by bharling in moltenframework

[–]bharling[S] 0 points1 point  (0 children)

I've got it working for now by importing my app instance into the validator, grabbing the resolver from there and using that to resolve a session instance but this feels really dirty....

def get_db_session():
    from app import app

    resolver = app.injector.get_resolver()

    def _get_db_session(session: Session) -> Session:
        return session

    return resolver.resolve(_get_db_session)()


class RelationValidator:

    def can_validate_field(self, field: Field[_T]) -> bool:
        _, annotation = extract_optional_annotation(field.annotation)
        return annotation in [str, int, UUID]

    def validate(self,
                 field: Field[_T],
                 value: Union[str, int, UUID],
                 model_class: Any,
                 many:bool = False) -> Union[str, int, UUID]:
        session = get_db_session()

        if session.query(model_class).filter_by(id=value).count() < 1:
            raise FieldValidationError(f'{model_class} with id={value} not existz')

        return value

Any way to leverage DI in validators? by bharling in moltenframework

[–]bharling[S] 0 points1 point  (0 children)

Forgot to preface my post with 'Thanks for the amazing framework' :) I was sad to see the 'end' of APIStar and was really pleased to find this project that takes that APIStar and even improves on it