Coder Social home page Coder Social logo

Comments (8)

uncle-lv avatar uncle-lv commented on August 17, 2024 2

Sure, I could help migrate them here. I thought about it, but it was lost on my to-do list.

I will submit a pull request to add the Config field.

@uncle-lv Could you help migrate the File related field and validators to flask-marshmallow?

Of course.

from flask-marshmallow.

sloria avatar sloria commented on August 17, 2024 2

These changes are released in 1.0.0

from flask-marshmallow.

greyli avatar greyli commented on August 17, 2024 1

Sure, I could help migrate them here. I thought about it, but it was lost on my to-do list.

I will submit a pull request to add the Config field.

@uncle-lv Could you help migrate the File related field and validators to flask-marshmallow?

from flask-marshmallow.

sirosen avatar sirosen commented on August 17, 2024 1

Wow, these got done in a flash! I think this is good to close, but please reopen if I'm wrong.

I noticed that Config uses _CHECK_ATTRIBUTE, which feels a little like an implementation detail in marshmallow leaking into downstream libraries. Would it be better for the field to define serialize instead of _serialize? (I haven't thought about this very hard, so apologies if that is just wrong-headed. 😄 )

from flask-marshmallow.

sloria avatar sloria commented on August 17, 2024

cc @greyli , you may be interested in this :)

from flask-marshmallow.

sirosen avatar sirosen commented on August 17, 2024

I haven't done very much here since I first got involved on this project, but I'd be happy to help with these too!

Config seems pretty small and easy to grasp. I'll need to read up a bit on apiflask's current File tooling.

from flask-marshmallow.

greyli avatar greyli commented on August 17, 2024

Created the pull request for the Config field: #281

from flask-marshmallow.

sloria avatar sloria commented on August 17, 2024

_CHECK_ATTRIBUTE isn't just an implementation detail--it's meant to be set by subclasses of Field when the attribute isn't meant to be accessed on the object to be serialized: https://github.com/marshmallow-code/marshmallow/blob/e099e058f8d17af08369d4485622d1c14f9084ed/src/marshmallow/fields.py#L138-L141

Config is very similar to fields.Constant, which sets _CHECK_ATTRIBUTE to False.

from flask-marshmallow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.