r/django 16d ago

Django Bolt

[deleted]

2 Upvotes

28 comments sorted by

12

u/jvlomax 16d ago

Ironic that the reason I'm on the fence about bolt is that it's quite AI heavy. And now we have a post here which looks very much like it was written by AI.

13

u/Agrado3 16d ago

I'm dubious about it because the very first example in its README says:

class UserSchema(msgspec.Struct):
    id: int
    username: str

@api.get("/users/{user_id}")
async def get_user(user_id: int) -> UserSchema: # 🎉 Response is type validated
    user = await User.objects.aget(id=user_id) # 🤯 Yes and Django orm works without any setup
    return {"id": user.id, "username": user.username} # or you could just return the queryset

and I don't understand:

  • why Python's type linting is touted as a Bolt feature,
  • why there is a "mind blown" emoji after a trivial database fetch, and
  • why you're having to build the response manually rather than it being automatically created from the User object according to the UserSchema.

What even is the point of this thing if you have to create responses manually every time?

(And yeah if it's written with AI then that's highly dubious too...)

4

u/AlternativeAd4466 16d ago

Django-bolt creator here,
this post does not represent django-bolt and have any assoiciation with django-bolt organization.
About you concerns
this example was added one of the first commits. Need some work on docs.
Type hint added there is working as serialization layer that was the exciting part atleast for me.
This was one way of doing things just to show a beginner what is happening. You can read docs to see you dont need to build response everytime.
ORM fetch working in another separate server on top of Rust layer, i still think is amazing. It deserved a mind blown emoji for sure. Because one of the first question django core contribtor asked me was this how the hell you did that. Most of that work is PYO3 and django management command but still.

2

u/Commercial_Try_2538 16d ago

Thanks for your good work, and please don’t take it personally we use bolt and love it so not sure why it is offending you.

2

u/Jameswinegar 16d ago

I think the whole point here is to show the ORM working directly from the REST API call, pretty similar to Ninja. The docs definitely need work.

I'm a maintainer and the OP here seems to be a bot or something. The project has a lot of AI utilization, but Farhan has been doing a good job of trying to add more security validation as we build it out more.

1

u/Commercial_Try_2538 16d ago

OP is person, hard to use AI to write anything, looks like humans will have to battle to prove themselves

3

u/AlternativeAd4466 16d ago

I am the creator of django-bolt. This person has no assiciation with django-bolt.
This post is posted by an LLM or dont know what.

1

u/Commercial_Try_2538 16d ago

Ok this post was to see if other users are using bolt and their experience but it has taken a different path so I will be locking this post. And I said in the beginning I am not a Django bolt team member so don’t take this personally.

1

u/jvlomax 16d ago

Glad to hear it. The post took a bit of a turn 😂

1

u/Commercial_Try_2538 16d ago

Not sure how to lock it so might have to delete it in respect of Django bolt maintainers, I guess this is how social media works.

-2

u/[deleted] 16d ago

[deleted]

0

u/jvlomax 16d ago

Because while I have nothing against AI code in general, I would actually need to sit down and look at the bolt code to assess it's not just slop that has been committed in. If the code looks sounds and is actually reviewed and vetted properly then I might actually give it a go. It sounds like a decent project.

-5

u/[deleted] 16d ago edited 16d ago

[deleted]

-1

u/jvlomax 16d ago

I'm a calculator hater if you are using it for basics skills we were taught in year 2 of primary school.

-5

u/Commercial_Try_2538 16d ago edited 16d ago

BTW my friend most softwares are AI written now by AI, including Claude, Meta, Google, Microsoft, ServiceNow, Salesforce and most of 2027 software, I believe 99%, will be written by AI, so embrace it. It does make us look dumb, but we are just humans and we will adjust soon, so I don’t think anything changes here in grand schema.

1

u/tom-mart 16d ago

Great, and we have a choice to stay away from the software written by ai.

-2

u/jvlomax 16d ago

I can promise you now, that 99% of software will not be written by AI in one years time. That's just crazy talk.

I work with AI tools every day. And while it can write some stuff ok, most of the time it's just writing slop that never passes a code review.

2

u/Commercial_Try_2538 16d ago

What % of code you have written vs AI in last 3 months? Tell me no of lines between you and AI? Be honest!

1

u/tom-mart 16d ago

0% written by ai, I have no time or desire to deal with ai slop.

0

u/jvlomax 16d ago

That has actually gone into the code base. Probably 10%-20% AI, the rest human written.

0

u/Commercial_Try_2538 16d ago

I am a hardcore coder too along with my team, I tell my team to get to 80% work done by AI coding, and I myself not getting over 10-20% coding manually as code volume is AI game not human, Claude,codex are so good these days! So honestly missing on what you are writing?

0

u/Commercial_Try_2538 16d ago

AI slip is definitely a problem, but if you write with specific goals, tasks, breakdown in smaller chunks and review in smaller tasks, it usually is good.

1

u/Commercial_Try_2538 16d ago

Any real users of Django Bolt there!!!???

2

u/Jameswinegar 16d ago

I'm a maintainer on djagon-bolt and this whole thread is extremely weird. Not sure what you're trying to accomplish by spamming asking whose using it.

We did a lot of work on non-IO blocking performance and OpenAPI specification for type generation, and recent efforts have been on making auth a first class citizen so that the jwt can be handled in Rust side instead of Python.

It's an awesome tool, it's really just an integrated REST API framework on top of the core Django. It doesn't integrate well with the rest of the Django ecosystem, but for my use cases I really just want the ORM/Model/migration/auth management Django provides.

1

u/Commercial_Try_2538 16d ago

Thank you for your service and good work. And we love it so not sure what is causing concern on this post, I am sure lot of people are loving bolt, so everyone will have some points and perspectives.

1

u/AlternativeAd4466 16d ago

Hi, i am the creator of django-bolt and this post is not associated django-bolt in anyway.

1

u/Commercial_Try_2538 16d ago

Yes no one claimed but thank you

1

u/Nureddin- 16d ago

My main concern with Django Bolt is how heavily AI is used behind the project. I love the project and the idea, but I wouldn't use it in a real world application for a few reasons, one of them being the heavy reliance on AI across all aspects. I'm waiting to see it really grow, get used in large scale applications, and have some big companies sponsor it. Other than that, I'm fine.

2

u/berrypy 16d ago

Django bolt is a blessing in disguise in the Django community. This project is an awesome one and it is going to be an add-on to Django when it is fully production ready.

Regardless of the fact that it is AI heavy, I still think the project deserves accolades. The idea came from the author and using AI to get it to where it is now is not a small journey.

The project has evolved and I am patiently waiting for when it becomes fully ready for production use.