Code Monkey home page Code Monkey logo

Comments (14)

alin23 avatar alin23 commented on June 18, 2024 1

@florimondmanca I'd be glad to help! Probably this weekend as my daily job is quite demanding nowadays. In the meantime, can you take a look here: #3 (comment)
I'd really like to see that PR merged ^_^

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024 1

Thanks @alin23.

I'd really like to see that PR merged ^_^

Just a note: keep in mind that Bocadillo is still in alpha, so I wouldn't advise using it in production (if that's what you're planning to do). Beyond possible API changes, there are still some important aspects that haven't been dealt with yet, such as security. 😉

from bocadillo.

alin23 avatar alin23 commented on June 18, 2024 1

Nope, not yet. The company I'm working with is on a last-mile talk with investors and I have to make sure everything's on track here. So I won't have much time for open source work these weeks.

Sorry for overpromising, I'd really like to contribute to this but I don't have the time yet

from bocadillo.

alin23 avatar alin23 commented on June 18, 2024 1

Awesome work! On 19th I'm getting back from a trip and I can hop on this db stuff.

from bocadillo.

alin23 avatar alin23 commented on June 18, 2024 1

Go for it! I'm buried in work and side-projects, I won't be able to get to it soon enough. 😞

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

@alin23 If you're interested in giving the asyncpg guide a go, I'd be more than happy to see what you come up with based on your past experience! 👍

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

Hi @alin23, have you got any chance to look at the asyncpg guide yet? 😊

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

I've just read more thoroughly through the Tortoise ORM docs and I thought — Tortoise may actually be sufficient for this how-to guide. At least, it's a more user-friendly advice than resorting to a raw client, and it will be very familiar to those who have used Django in the past.

I'm leaving a link to their Get started guide here for reference. Might be worth adapting it to show how to setup the DB, create a model and use it in some views.

from bocadillo.

alin23 avatar alin23 commented on June 18, 2024

It definitely looks much better than raw sql ^_^
I think we need a startup event that runs after the loop is initialized but before the server is started to allow initialization for this. Do we have anything like this?

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

We don't yet, but that's definitely doable (at worst wrapping around Starlette's event handling). Plus I've been thinking we'd need this at some point.

It looks like opening connections needs the startup event and cleaning up needs shutdown.

If you're feeling like it you can open a feature request for that? :)

from bocadillo.

alin23 avatar alin23 commented on June 18, 2024

Sure!

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

Hi @alin23, #62 (startup and shutdown events) has just been merged. 👍

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

Just for my information, have you been working on this @alin23? I just found myself in a mood to tackle this today, with the second goal of showing an example "blog" app as described in #25.

from bocadillo.

florimondmanca avatar florimondmanca commented on June 18, 2024

No worries, understood!

from bocadillo.

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.