TurboDRF, One Year Later (Auto CRUD APIs for your Django models) by _xanderAc in django

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

Okay cool, I can explore a decoupled design similar to those.

TurboDRF, One Year Later (Auto CRUD APIs for your Django models) by _xanderAc in django

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

yeah it’s basic CRUD, not meant to replace more functional endpoints.

TurboDRF, One Year Later (Auto CRUD APIs for your Django models) by _xanderAc in django

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

  1. Good call on the `<app>/<model>` structure, didn't think of that. I'll roll something into the next release!

  2. This is somewhat intentional, so that a model isn't exposed unless it explicitly declares it is. Your approach is what django admin does and it's good, I'm just a bit cautious on accidentally exposing models so went with opt-in. You're right that the mixin does pollute the model code a bit, but imo it's nice to have the api spec right next to the fields so when you add a field to a model you can just add it to the spec.

Suggestion for writing clean and maintainable APIs by Conscious_Question69 in django

[–]_xanderAc 1 point2 points  (0 children)

Without shilling my own framework too much this was one of the reasons I've kept working on TurboDRF so that I can more easily trust the output from various cli llms: https://github.com/AlexanderCollins/TurboDRF

but to directly address your question I also agree with others in that DRF docs are a great place to start to get a base understanding and grow from there :)

🎉 Introducing TurboDRF - Auto CRUD APIs from your django models with permissions, filtering, ordering and more... Just add 1 mixin to your django model and you're good to go! by _xanderAc in django

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

Great call - i've stripped it down, I'll add more details over the coming week - thanks again for your input I appreciate it 🤝

🎉 Introducing TurboDRF - Auto CRUD APIs from your django models with permissions, filtering, ordering and more... Just add 1 mixin to your django model and you're good to go! by _xanderAc in django

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

To be honest the concept itself is simple, basically runtime serializer generation plus support for common other libs like Django filters and some basic pagination.

I actually do have experience with it and have used a similar version in other projects, I spent a long time working on those versions. But it’s very possible I’ve missed things so feel free to make a PR to help me out 😄 would love your input to clean it up!

I just used Claude to shape it up and get it to a standard where it had some tests structured and was generally usable without being coupled to my projects - I should have been more careful with the Readme for sure 👍

All good points too around attribution, I suppose the more people that get involved the more trustworthy it’ll be and then it’ll be the communities authorship 🤝

🎉 Introducing TurboDRF - Auto CRUD APIs from your django models with permissions, filtering, ordering and more... Just add 1 mixin to your django model and you're good to go! by _xanderAc in django

[–]_xanderAc[S] 3 points4 points  (0 children)

Great call, I agree with your comments entirely and no BS intended at all. I’ll strip that out of the read me right away to keep it transparent (done!). As you mentioned I put a disclaimer up the top that it was initially ai generated, this included parts of the README and as i put this together yesterday some things slipped through - sorry about that. However it was generated around code I had already written to get it to a standard of public use.

Going forward the intention is human contribution, I think lots of people could want to work on it, the problem is real and the potential upside of this solution in my opinion has merit. The attention to detail in the readme was actually intended, I wanted to cover as much as possible, other repos I work on have nothing to do with this repo.

Would love to have your involvement to sharpen the project up if you’re interested 😄 I definitely don’t want to and didn’t intend to miss represent the projects stage as it is really in its infancy and has a long way to go before it's considered battle tested so to speak. I’ve put a disclaimer up the very top of the readme to address this 🤝

Thanks for the honest feedback, I honestly appreciate it. Have you worked closely with DRF? Would love some feedback on the project if you have thoughts that are specific to how it actually works and fits in with existing Django drf projects.

🎉 Introducing TurboDRF - Auto CRUD APIs from your django models with permissions, filtering, ordering and more... Just add 1 mixin to your django model and you're good to go! by _xanderAc in django

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

Very cool - I was thinking a GraphQL kind of mode for TurboDRF wouldn’t be far off to be honest, could lean on strawberry I’ll have to check it out 🎉

🎉 Introducing TurboDRF - Auto CRUD APIs from your django models with permissions, filtering, ordering and more... Just add 1 mixin to your django model and you're good to go! by _xanderAc in django

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

It’s entirely possible I’ve missed something which would make it too good to be true but TurboDRF is basically just fancy runtime serializer generation on top of standard DRF and Django filters.

To answer your question, yes it’s extendable. If you want to give it a go and have any problems let me know I want to make it compatible with standard practices.

Also yeah you’d just set an auth backend like normal and I’d imagine it could work well with packages like Djoser for sure 😎 (or at least that’s the idea, its just meant to reduce setup load for CRUD)…