teclado
teclado
  • 191
  • 2 766 093
Litestar Tutorial: Build Performant REST APIs
Litestar is a library for building web services using Python. In this video, I show you some of its features to build an API using Docker, PostgreSQL, and Hostman.
Sign up to Hostman and link a credit card to get $100 credit valid for 7 days: bit.ly/4elfo4g
00:00 Intro
00:38 The Hello World App
02:23 Running with Docker
05:55 Building the full API
06:40 Adding our dependencies
07:16 Configuring the db connection
09:41 Writing the first endpoint
11:15 Creating todos
16:08 Generating IDs in the server
19:23 Deploying to Hostman
-- Links --
🐍 Access all our courses: teclado.com/subscribe/
✅ Subscribe to the channel: czcams.com/users/tecladocode
zhlédnutí: 358

Video

What is a CSRF token? - Cookies and CSRF explained for Django and Flask
zhlédnutí 687Před 3 měsíci
Cookies and CSRF attacks go hand in hand. In this video I explain what are cookies, what are CSRF attacks and what are CSRF tokens (plus other wants of defending against CSRF attacks) using both Flask and Django. Links 🐍 Our Web Dev Bootcamp course: go.tecla.do/web-dev-course-sale ✅ Subscribe to the channel: czcams.com/users/tecladocode
Tracking Web and Product Analytics with PostHog and Python
zhlédnutí 495Před 4 měsíci
Learn Web Dev with Flask: go.tecla.do/web-dev-course-sale PostHog is a great tool for web and product analytics, running a/b tests, and more. In this video I tell you a bit about it, and show you how I add it to my Flask applications. Links 📝 Blog post: blog.teclado.com/analytics-posthog-python-flask/ ✅ Subscribe to the channel: czcams.com/users/tecladocode
FastAPI: New Course Launch!
zhlédnutí 1KPřed 9 měsíci
On Teclado: go.tecla.do/fastapi On Udemy: go.tecla.do/fastapi-udemy Thank you for your support! Enjoy the course!
Will ChatGPT Take Our Jobs?
zhlédnutí 463Před 10 měsíci
Should we be worried about our software development jobs with ChatGPT? Plus, some tips on how to use it to maximimise your productivity! Links 🐍 Our Courses: teclado.com ✅ Subscribe to the channel: czcams.com/users/tecladocode
First Class Functions in Python - Q&A Thursdays
zhlédnutí 665Před 10 měsíci
Let's talk about first class functions in Python! First class means that functions can be assigned to variables or passed as arguments to other functions. We'll also briefly talk about the itertools library. Links 🐍 Our Courses: teclado.com ✅ Subscribe to the channel: czcams.com/users/tecladocode 📝 itertools documentation: docs.python.org/3/library/itertools.html
Python logging tutorial: __name__ and logger inheritance
zhlédnutí 3,6KPřed 11 měsíci
In this Python logging tutorial, let's take a look at the name (dunder name) variable, and how it can help us set up a logging system using in Python. Links 🐍 Our FastAPI Course: teclado.com/fastapi-101 ✅ Subscribe to the channel: czcams.com/users/tecladocode
Factory Pattern in Python by Example - Q&A Thursdays
zhlédnutí 4,3KPřed 11 měsíci
The factory pattern lets us define how to create an object given some source data. Learn how to implement it using Python. The factory pattern allows us to move the transformation of the source data into an appropriate format for the class constructor into a factory function. Take a look at the example for more info! Links 🐍 Our Courses: teclado.com ✅ Subscribe to the channel: czcams.com/users/...
Python logging tutorial: loggers, handlers, and formatters
zhlédnutí 6KPřed rokem
Heard that logging is good, but you don't know how to get started? In this Python logging tutorial, let me help you get started by learning about loggers, handlers, and formatters! Links 🐍 Our upcoming FastAPI course: teclado.com/page/fastapi-101 ✅ Subscribe to the channel: czcams.com/users/tecladocode ✅ Our Discord server: discord.gg/78Nvd3p ✅ Twitter: jslvtr
Introduction to pytest: A Beginner's Guide
zhlédnutí 1,7KPřed rokem
Introduction to pytest: A Beginner's Guide
Query string arguments in Flask (and Flask-Smorest)
zhlédnutí 1,8KPřed rokem
Query string arguments in Flask (and Flask-Smorest)
Build your first REST API with Flask and PostgreSQL
zhlédnutí 62KPřed rokem
Build your first REST API with Flask and PostgreSQL
Simplify database code with SQLModel and Python
zhlédnutí 3,4KPřed 2 lety
Simplify database code with SQLModel and Python
The Complete Guide to Python Virtual Environments!
zhlédnutí 335KPřed 3 lety
The Complete Guide to Python Virtual Environments!
How to add graphs EASILY to your Flask apps!
zhlédnutí 63KPřed 3 lety
How to add graphs EASILY to your Flask apps!
Make a New Year Countdown Timer with Python!
zhlédnutí 3,8KPřed 3 lety
Make a New Year Countdown Timer with Python!
What are content categories in HTML? - Flow, phrasing, heading, and more!
zhlédnutí 3,1KPřed 3 lety
What are content categories in HTML? - Flow, phrasing, heading, and more!
How to reuse code blocks easily with Jinja2 macros!
zhlédnutí 20KPřed 3 lety
How to reuse code blocks easily with Jinja2 macros!
How to display dynamic data tables with Python, Flask, and Jinja2
zhlédnutí 151KPřed 3 lety
How to display dynamic data tables with Python, Flask, and Jinja2
How I started to code as a complete beginner
zhlédnutí 2,6KPřed 3 lety
How I started to code as a complete beginner
Permanent data storage with PostgreSQL - Flask Tutorial for Beginners [5 of 5]
zhlédnutí 13KPřed 3 lety
Permanent data storage with PostgreSQL - Flask Tutorial for Beginners [5 of 5]
Dynamic Web Pages - Flask Tutorial for Beginners [4 of 5]
zhlédnutí 20KPřed 3 lety
Dynamic Web Pages - Flask Tutorial for Beginners [4 of 5]
Receive Form Data - Flask Tutorial for Beginners [3 of 5]
zhlédnutí 19KPřed 3 lety
Receive Form Data - Flask Tutorial for Beginners [3 of 5]
HTML and CSS - Flask Tutorial for Beginners [2 of 5]
zhlédnutí 21KPřed 3 lety
HTML and CSS - Flask Tutorial for Beginners [2 of 5]
How Web Applications Work - Flask Tutorial for Beginners [1 of 5]
zhlédnutí 20KPřed 3 lety
How Web Applications Work - Flask Tutorial for Beginners [1 of 5]
5 awesome tools you NEED as a developer
zhlédnutí 1,9KPřed 3 lety
5 awesome tools you NEED as a developer
How to break down a HUGE software project!
zhlédnutí 11KPřed 4 lety
How to break down a HUGE software project!
Python SQLite Tutorial: Build a Python project with a SQLite database
zhlédnutí 54KPřed 4 lety
Python SQLite Tutorial: Build a Python project with a SQLite database
Build a HIIT Timer with Flask and JavaScript (Part 2)
zhlédnutí 4KPřed 4 lety
Build a HIIT Timer with Flask and JavaScript (Part 2)
I coded a HIIT Timer with HTML and CSS (Part 1)
zhlédnutí 2,4KPřed 4 lety
I coded a HIIT Timer with HTML and CSS (Part 1)

Komentáře

  • @guguladitya
    @guguladitya Před 6 dny

    I did not know macros thanks

  • @user-ed3vh1tt7c
    @user-ed3vh1tt7c Před 8 dny

    Hi everyone i cant do the db part because elephantsql are shutting down i cant register anything else i can use please

  • @ariefdharma5575
    @ariefdharma5575 Před 11 dny

    AttributeError: module 'PySimpleGUI' has no attribute 'window'?

  • @luisarmandogomezdegyves8212

    This is the best video for understand virutal enviroments from scratch, great video and thank you

  • @SFerDev
    @SFerDev Před 16 dny

    So basically this is the course that has replaced your advanced flask api course. Because it seems that it's no longer available on your website nor on udemy?

  • @gnidarada
    @gnidarada Před 26 dny

    Did I miss it or does this "complete guide" never mention how to specify Python version for a given venv?

    • @tecladocode
      @tecladocode Před 26 dny

      Helllo! It doesn't, because that's unrelated to virtual environments. The virtual environment is created with a Python version of your choosing, and that's the Python version the virtual environment used. I'd recommend looking at pyenv (or pyenv-win on Windows): blog.teclado.com/how-to-use-pyenv-manage-python-versions/

  • @aebel.shajan
    @aebel.shajan Před 26 dny

    I always wondered about this. Thank u 🙏

  • @movietalkstudio3030
    @movietalkstudio3030 Před 27 dny

    amazing

  • @funnyrockffandfood9065
    @funnyrockffandfood9065 Před měsícem

    bro i need more advance video based on this ...........please upload it or give me some hint or sent me anyothers video based on this but advance

    • @funnyrockffandfood9065
      @funnyrockffandfood9065 Před měsícem

      and also thanks

    • @tecladocode
      @tecladocode Před 26 dny

      Thank you! I have many, many advanced videos in my course on building REST APIs with Flask: teclado.com/rest-apis-flask-python/ Check it out, and let me know what you think!

  • @TaxicletteSan
    @TaxicletteSan Před měsícem

    From the Processing reference: "In Processing, all fields and methods are public unless otherwise specified by the private keyword." Just to avoid confusion for beginners... (in other tutorials "public" isn't used)

  • @Clewerly
    @Clewerly Před měsícem

    Great video, it would be good to learn how to handle multiple databases (or database connections) in the same API. The example hard codes one specific database connection in the DB_URL variable

    • @tecladocode
      @tecladocode Před 27 dny

      Thanks for the comment! I've never required multiple databases simultaneously in a codebase. Is this for a multi-tenant application with super strong security requirements?

    • @Clewerly
      @Clewerly Před 27 dny

      @@tecladocode Not strong security but users and different applications need to be restricted to specific databases (IP reasons etc). The API is based off a variety of ingested source data that is all in different formats and setups, but comes together for 2-3 similar applications with different users.

    • @tecladocode
      @tecladocode Před 27 dny

      @@Clewerly I get you! In that case you'd opt for a slightly different approach. Instead of setting a DATABASE_URL and passing that to the SQLAlchemyPlugin, you'd have a configuration file with the multiple databases. Presumably they wouldn't all be SQL, so then you'd also have a different way of connecting to each depending on their type. It can get a bit complicated!

  • @AliEgemenB
    @AliEgemenB Před měsícem

    As a second year CS student this was great. Everything made sense. After watching this I tried conda, hated it, switched to venv. Now I'm a happy Data Science learner thanks to you.

    • @tecladocode
      @tecladocode Před 27 dny

      Glad it helped! Thanks for the comment!

  • @mcdonaldslover52
    @mcdonaldslover52 Před měsícem

    if i'm just making changes locally & not adding any new dependencies, is it still worth building my docker and running it? or should i just do litestar run? i get you want to build in docker often to have more certainty that your docker file/build is up to date and wont break, but for smaller things im guessing its fine?

    • @tecladocode
      @tecladocode Před 27 dny

      I would use Docker, if anything to make sure that when you deploy, the runtime will be the same locally and in production. Also once you get into the habit, it doesn't take any longer than doing `litestar run`. And once you add Docker Compose, you can also spin up (or down!) a database or other services very easily. It all starts with Docker.

  • @mcdonaldslover52
    @mcdonaldslover52 Před měsícem

    thanks for the video - it would be great to see how a proper project directory should be setup for litestar, i saw they encourage you to separate controllers and models but im not exactly sure how that all works

    • @tecladocode
      @tecladocode Před 27 dny

      Great suggestion! I will have a look at it!

  • @prezlamen
    @prezlamen Před měsícem

    Can you use bigger fonts? I appreciate your teaching skill, but I cannot see your content good enough I am vision impaired.

    • @tecladocode
      @tecladocode Před měsícem

      Thanks for the feedback! I'm actually not sure I can go much larger! If I do, you won't be able to see any context around the code I'm typing. Are you on mobile?

  • @RajeebLochanChand
    @RajeebLochanChand Před měsícem

    mannn thankkkkks

  • @SteveMunsonPublic
    @SteveMunsonPublic Před měsícem

    ElephantSQL is discontinuing its services. The product will reach its End of Life on January 27, 2025. I wasn't able to create an account to even follow along with this video.

    • @tecladocode
      @tecladocode Před 27 dny

      It is indeed! Another service must be used, unfortunately!

  • @MoJoeLogic
    @MoJoeLogic Před měsícem

    Hi Jose, great name. Did you ever create the calendar mentioned at the end?

    • @tecladocode
      @tecladocode Před 26 dny

      You know, I forgot about this! After some deep searching in my computer, I found a Jinja calendar. I'll make a short about it, it's not overly difficult! Subscribe to the channel, I'll upload it in a few days!

    • @MoJoeLogic
      @MoJoeLogic Před 26 dny

      ​@@tecladocodealready subscribed! Looking forward to the video.

  • @hansblod3379
    @hansblod3379 Před měsícem

    This is how I like it! Mostly I hate youtube videos about coding because there is so much "boilerplate content" around it. This is pretty much straight to the point. Good one! Maybe you could add small things around the subject at hand. For example, can you add type annotations to macros and stuff. I am completely new to the subject, so maybe this point wont make any sense. But you get the point^^

    • @tecladocode
      @tecladocode Před 27 dny

      Thank you very much! Glad you liked the video. Regarding type definitions, I don't think you can do it with Jinja. You wouldn't get good editor support anyway. Something I have done is add a comment at the top of particularly complex macros or includes documenting the arguments it should receive and what they are for.

  • @samana991
    @samana991 Před měsícem

    Thanks for the explanations; good stuff!

  • @imranyasin7537
    @imranyasin7537 Před měsícem

    "Important announcement: ElephantSQL will discontinue its services. The product will reach its End of Life on January 27, 2025. After May 1, 2024, we will cease to accept new users."

  • @imranyasin7537
    @imranyasin7537 Před měsícem

    Great video!! Thank you very much

  • @NajmaAbdirezak
    @NajmaAbdirezak Před měsícem

    Thank you so much.

  • @aashayamballi
    @aashayamballi Před měsícem

    Thank you

  • @antoineblasiak2623
    @antoineblasiak2623 Před 2 měsíci

    Thanks mate, very useful

  • @diegodifelix
    @diegodifelix Před 2 měsíci

    What a great video. Thank you very much. I did a resume to me.

  • @randalltockes2247
    @randalltockes2247 Před 2 měsíci

    This was totally the explanation i needed for a few concepts. Thank you for this.

  • @collinsonOga
    @collinsonOga Před 2 měsíci

    You're highly underrated man

  • @Spyrosigma
    @Spyrosigma Před 2 měsíci

    ElephantSQL just posted that they're shutting down : (

  • @kellzbaker
    @kellzbaker Před 2 měsíci

    don't fret is %PATH% doesn't work on power shell, it's a diff command - echo $Env:PATH

  • @minnies2730
    @minnies2730 Před 2 měsíci

    void setup() { size(640, 480); } void draw() { background(455); ellipse (x, 100,50,50); x = x + dx; if(x+25 > width) { dx = -1; } if(x+25 > width) { dx = -1; } if(x <0) { dx = 1; } }

    • @minnies2730
      @minnies2730 Před 2 měsíci

      Copy paste if ur doing this for school n ur too lazy to type urself

  • @ErasermationsOSC
    @ErasermationsOSC Před 2 měsíci

    I have one question, on some on the code for example “x = x + 1;” I was curious to see what would happen without a space and.. well nothing happened.

  • @user-ry5zu1wo4e
    @user-ry5zu1wo4e Před 2 měsíci

    Thank you. Very helpful

  • @mrn3ts210
    @mrn3ts210 Před 2 měsíci

    Hello, Jose I know this isn't related to this topic but I always wondered how you type so fast when you are programming I mean by using Operators, Delimiters, and Special Symbols do you touch type?

    • @tecladocode
      @tecladocode Před 2 měsíci

      Hey! I do touch type. A lot of practice and some lessons (on a typewriter!) when I was a kid. That said typing fast isn't very important. Most of the time is spent thinking, and nowadays with AI-assisted coding, typing will be even less important.

    • @mrn3ts210
      @mrn3ts210 Před 2 měsíci

      @@tecladocode Thanks for the response Jose! I am truly grateful. I will keep practicing but making sure not to stress too much about it, and I have been making progress. I am a 14 year old currently taking the course "The Complete Python Course Learn Python by Doing" I am astonished by your work and I am looking forward to you! :)

  • @erkayberkant1828
    @erkayberkant1828 Před 2 měsíci

    I watched many tutorials about Sqlite, but the way you teach this, is really the best.

    • @tecladocode
      @tecladocode Před 2 měsíci

      Thank you very much! Glad you liked it 😁

  • @davemcdonald6799
    @davemcdonald6799 Před 2 měsíci

    I found this one of the better introductory pytest videos, nice job! I'll be sharing this video with others on my team that also need to come up to speed on pytest.

    • @tecladocode
      @tecladocode Před 2 měsíci

      Thank you! Glad you liked the video, and thanks for sharing! Let me know if there's any other content you're particularly interested in.

  • @jake115577
    @jake115577 Před 2 měsíci

    This made me subscribe! Great tutorial man

    • @tecladocode
      @tecladocode Před 2 měsíci

      Thanks for the sub and the comment! Really appreciate it 💪

  • @RahulSharmaSingularity
    @RahulSharmaSingularity Před 2 měsíci

    Awesome and clear !

  • @Kennethlumor
    @Kennethlumor Před 2 měsíci

    Sir please I keep on hearing this that flask is not capable of creating or cannot handle large project and we should not use it but rather django.

    • @tecladocode
      @tecladocode Před 2 měsíci

      Thanks for the comment! This is a tricky one to answer. If you are using Flask but you are coding yourself what Django gives you out of the box... You should use Django instead. But if you are using Flask for a large production project because you need the speed of development, flexibility, or the huge ecosystem of plugins, then Flask is definitely an option. Many companies use Flask for large apps in production, and it's fine!

  • @drilonqorraj6538
    @drilonqorraj6538 Před 2 měsíci

    Can i Change it to one drive Because i want to Change it to Desktop it says the path couldnt be found

  • @jgojiz
    @jgojiz Před 3 měsíci

    While the venv is activate all my code will be able to recognize the dependencies installed inside the virtual env?

    • @tecladocode
      @tecladocode Před 2 měsíci

      When your virtual environment is active, you're using the Python version and installed packages inside that virtual environment. When you run your code using that Python version, you'll be able to access the installed packages.

  • @manfredbogner9799
    @manfredbogner9799 Před 3 měsíci

    Sehr gut

  • @barmalini
    @barmalini Před 3 měsíci

    I copied your code exactly, but keep getting this erro: File "l:\app.py", line 10, in from_csv_line return cls(*line.strip().split(",")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: Person() takes no arguments Could anyone help? UPD: Ok, I found the error, turns out that my __init__ wasn't spelled correctly, it had three underscores in the beginning instead of only two. Silly me

  • @Simombrun1980
    @Simombrun1980 Před 3 měsíci

    How do you make the circle go from the top to the bottom of the canvas?

  • @RajendraMedini
    @RajendraMedini Před 3 měsíci

    Hi. Thanks for the awesome video.

  • @ivochristian
    @ivochristian Před 3 měsíci

    Very good. Straight to the point

  • @CodingIsArt-cw6cn
    @CodingIsArt-cw6cn Před 3 měsíci

    Great video!

  • @dhruvtara6537
    @dhruvtara6537 Před 3 měsíci

    My idea with logging is super clear now. Thank you .

  • @maf7624
    @maf7624 Před 3 měsíci

    what a perfect guide!