Build a Blockchain with Python & FastAPI

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • In this video we're going to look at how to build a blockchain using Python and then access it using an API built with FastAPI.
    👨‍💻 Looking for a web developer job, visit: www.webdevjobs...
    👽 Discord - / discord
    The finished code can be found here:
    👾 - github.com/six...

Komentáře • 58

  • @iamrithmic
    @iamrithmic  Před 7 měsíci

    👽 Join the Discord Server (link in the description)

  • @John-xi2im
    @John-xi2im Před 6 měsíci +3

    learned a lot of new stuff, fastapi and blockchain concepts were really well coded, awesome tutorial. 😃

    • @iamrithmic
      @iamrithmic  Před 6 měsíci

      Great to hear! Thanks for the comment :)

  • @sany2k8
    @sany2k8 Před 2 lety +5

    Thanks for the FastAPI content, subscribed. Don't stop posting new video's related to FastAPI.

    • @iamrithmic
      @iamrithmic  Před 2 lety +2

      Thanks for the comment :). I will be uploading another FastAPI one today and also have some more planned

  • @CodingEntrepreneurs
    @CodingEntrepreneurs Před 2 lety +10

    What a great idea for a series. Keep up the efforts!
    Just curious, how many blockchain projects do you have?!

    • @iamrithmic
      @iamrithmic  Před 2 lety +3

      Thank you so much :). As of right now ive just started jumping into solidity so nothing just yet, maybe at some point in the future. May do tutorials on that

    • @CodingEntrepreneurs
      @CodingEntrepreneurs Před 2 lety +1

      @@iamrithmic cool! I’ll look out for them

    • @l.1204
      @l.1204 Před 2 lety +1

      @@iamrithmic Hey man, take a look in the Cardano Blockchain... It's a blockchain of 3rd generation and very promising;
      It's the only blockchain with solid technological and scientifical staff;

  • @optimusprime699
    @optimusprime699 Před 2 lety +2

    Block chain architecture seems surprisingly simple from watching this.

    • @jordixboy
      @jordixboy Před 2 lety +2

      wait till you develop your own virtual machine and make it capable of executing code

  • @c19souravchowdhury21
    @c19souravchowdhury21 Před 2 lety +2

    Bro what is that u are typing at 0:26?

  • @joefelx
    @joefelx Před 2 lety +2

    Your code looks really clean and neat👍

  • @freepythoncode
    @freepythoncode Před 8 měsíci +2

    Thank you so much 🙂❤
    I want ask you
    How bitcoin miners and users connect each other to share transactions data ?

    • @Nobody-eg4bi
      @Nobody-eg4bi Před 3 měsíci

      using nodes

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

      @@Nobody-eg4bi how this nodes find each other 🤔

    • @Nobody-eg4bi
      @Nobody-eg4bi Před 3 měsíci

      @@freepythoncode by using dns seeder, these nodes can find each other

    • @Nobody-eg4bi
      @Nobody-eg4bi Před 3 měsíci

      @@freepythoncode dns-seeder

  • @stevenjohn968
    @stevenjohn968 Před 2 lety +1

    hi Rithmic, thanks for a wonderful sharing with code. I have 2 questions: Q1. Why you do not include the Block hash in the the Block structure?
    Q2. When you do Blockchain validation by checking the previous_hash etc, why do you need to do the Proof-of-work again?
    The Nounce should be solved once and then the Block hash is generated. We should not need to run POW again - which is a lengthy operation - during verification.
    Appreciate your reply. thanks.

    • @tchnque2234
      @tchnque2234 Před rokem

      I was also wondering, had he not run PoS instead with the hash check function? or am I confused?

  • @thewilltejeda
    @thewilltejeda Před 2 lety +2

    I'd love to see someone actually launch a python blockchain, for real, and document it
    I think it would make for a really interesting series. I've mostly been curious to see more python-based dapps
    I'd love to launch a few daps but have had trouble finding anything beyond hello world (even among paid content)

    • @tchnque2234
      @tchnque2234 Před rokem

      been working on an open source python blockchain. i have a feeling it would be greeat cause python is so much easier to understand than other languages

  • @yacoubaabasskabore8999
    @yacoubaabasskabore8999 Před 2 lety +1

    Need help
    Import "fastapi" could not be resolved Pylance reportMissingImports
    what my vscode says in main.py.

  • @absinth4
    @absinth4 Před 2 lety +3

    very nice video ! which completion tool are you using and theme/fonts as well?

  • @ANDIBAUER97
    @ANDIBAUER97 Před rokem

    hey Rithmic, very nice video! I hope your chanel grows fast! Wish you the best!

    • @iamrithmic
      @iamrithmic  Před rokem

      Thank you for such a nice comment!

  • @ranjithakrishnan8899
    @ranjithakrishnan8899 Před rokem

    can you help me, how to implement blockchain p2p network on considering 5 computers using python program

  • @user-tu9ij7to2v
    @user-tu9ij7to2v Před 7 měsíci

    Hey, @rithmic is it an Ethereum blockchain? Can I add a smart contract with it?

  • @daveamies5031
    @daveamies5031 Před rokem +1

    This was a really great tutorial on a proof of work blockchain, do you think you could do one on a proof of stake blockchain as well?
    I've seen quite a few tutorials on proof of work blockchains (this was the best so far), I've yet to find one on proof of stake.

    • @iamrithmic
      @iamrithmic  Před rokem +1

      Your comment brought a smile to my face. I haven’t planned one in the near future, but will note it down to look into. Thank you 😊

    • @daveamies5031
      @daveamies5031 Před rokem +1

      @@iamrithmic Your welcome, I know sometimes it's hard to come up with ideas for videos, so I thought to ask hoping you'll make it 🤞🏻

  • @plashless3406
    @plashless3406 Před 2 lety +2

    Amazing. Bro.
    Really Helped me a lot.

    • @iamrithmic
      @iamrithmic  Před 2 lety

      Thanks for the comment man! Glad it was of help

  • @zidanegimiga
    @zidanegimiga Před 2 lety +1

    Just curious, what would happen if this blockchain is being mined from different nodes almost at the same time... How reliable would this system be un ensuring that no 2 blocks have the same indexes or it doesnt crash

  • @firstnamelastname4685
    @firstnamelastname4685 Před 2 lety +2

    then this will be a centralized server?
    I guess ethereum doesnt have a server like this?

  • @aromax504
    @aromax504 Před 2 lety +2

    WHy do you need previous_proof as an argument for _proof_of_work() function?

    • @iamrithmic
      @iamrithmic  Před 2 lety +2

      In order to create the next proof we also need to previous proof. If in the case that valus of proof-1 changes, then we know that the blockchain is incorrect

    • @aromax504
      @aromax504 Před 2 lety +1

      @@iamrithmic correct.thank you for the explanation

    • @jimbrannlund4677
      @jimbrannlund4677 Před 2 lety +1

      You don't need the previous NONCE. The previous nonce is part of the previous hash, meaning if it changes the previous hash changes and invalidates the chain.

  • @Kos37376
    @Kos37376 Před rokem

    bro thanks for video. but repsonally I'm confused. there are a lot of information for me :D pls make video about web3 !!!

  • @patricktomczykaarup6363

    Great video. I am getting AttributeError: module 'blockchain' has no attribute 'Blockchain' when running the bc = blockchain.Blockchain() do you have something else imported which is not visible in the script?
    Cheers

  • @eugenetsukerman209
    @eugenetsukerman209 Před rokem

    And blockchain actually is being stored on the server?

  • @mjmj007a
    @mjmj007a Před 2 lety +2

    Good work and Thank You...

  • @shashanksingh4708
    @shashanksingh4708 Před rokem +1

    Hi can you make more such videos using fast api and block-chain

    • @iamrithmic
      @iamrithmic  Před rokem +1

      Will be thinking on more ideas :)

    • @shashanksingh4708
      @shashanksingh4708 Před rokem

      @@iamrithmic thanks, I was thinking something including fastapi, web3.py and solidity would be great

  • @mikebeats3281
    @mikebeats3281 Před 2 lety +2

    Why are there no advanced professional real world blockchain tutorials out there? No wonder qualified blockchain developers are hard to find, the ones who can really do this without costing their bosses - clients billions of dollars are now getting a million dollars a year plus a boatload of tokens! 🤣😂

  • @lakshmanpalli2925
    @lakshmanpalli2925 Před 2 lety +2

    Can you please, elaborate on the use and functioning of proof variable?

    • @iamrithmic
      @iamrithmic  Před 2 lety

      Is this in regards to the previous_proof or proof?

    • @lakshmanpalli2925
      @lakshmanpalli2925 Před 2 lety

      @@iamrithmic proof variable, I think you are just bypassing the consensus for putting it simple.

  • @kurama_9_tails21
    @kurama_9_tails21 Před 2 lety +1

  • @utsavchatterjee4733
    @utsavchatterjee4733 Před 2 lety

    How can we store those blocks..?

  • @yusufhenry9365
    @yusufhenry9365 Před 2 lety +2

    Can you be my mentor please!!
    It will be an honor if someone like you hold me through programming world

    • @iamrithmic
      @iamrithmic  Před 2 lety +1

      Haha thanks for comment, hopefully i can help further through these videos :)