Build a Blockchain with Python & FastAPI

Поделиться
HTML-код
  • Опубликовано: 27 сен 2021
  • 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.io/
    👽 Discord - / discord
    The finished code can be found here:
    👾 - github.com/sixfwa/blockchain-...

Комментарии • 58

  • @iamrithmic
    @iamrithmic  5 месяцев назад

    👽 Join the Discord Server (link in the description)

  • @John-xi2im
    @John-xi2im 4 месяца назад +3

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

    • @iamrithmic
      @iamrithmic  4 месяца назад

      Great to hear! Thanks for the comment :)

  • @CodingEntrepreneurs
    @CodingEntrepreneurs 2 года назад +10

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

    • @iamrithmic
      @iamrithmic  2 года назад +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 2 года назад +1

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

    • @l.1204
      @l.1204 2 года назад +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;

  • @ANDIBAUER97
    @ANDIBAUER97 Год назад

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

    • @iamrithmic
      @iamrithmic  Год назад

      Thank you for such a nice comment!

  • @absinth4
    @absinth4 2 года назад +3

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

  • @joefelx
    @joefelx 2 года назад +2

    Your code looks really clean and neat👍

  • @plashless3406
    @plashless3406 2 года назад +2

    Amazing. Bro.
    Really Helped me a lot.

    • @iamrithmic
      @iamrithmic  2 года назад

      Thanks for the comment man! Glad it was of help

  • @sany2k8
    @sany2k8 2 года назад +5

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

    • @iamrithmic
      @iamrithmic  2 года назад +2

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

  • @mjmj007a
    @mjmj007a 2 года назад +2

    Good work and Thank You...

    • @iamrithmic
      @iamrithmic  2 года назад +1

      More than welcome 😀

  • @optimusprime699
    @optimusprime699 2 года назад +2

    Block chain architecture seems surprisingly simple from watching this.

    • @jordixboy
      @jordixboy 2 года назад +2

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

  • @zidanegimiga
    @zidanegimiga 2 года назад +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

  • @stevenjohn968
    @stevenjohn968 2 года назад +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 Год назад

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

  • @daveamies5031
    @daveamies5031 Год назад +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  Год назад +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 Год назад +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 🤞🏻

  • @thewilltejeda
    @thewilltejeda 2 года назад +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 Год назад

      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

  • @c19souravchowdhury21
    @c19souravchowdhury21 2 года назад +2

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

  • @kurama_9_tails21
    @kurama_9_tails21 2 года назад +1

  • @patricktomczykaarup6363
    @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

  • @freepythoncode
    @freepythoncode 6 месяцев назад +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 Месяц назад

      using nodes

    • @freepythoncode
      @freepythoncode Месяц назад

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

    • @Nobody-eg4bi
      @Nobody-eg4bi Месяц назад

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

    • @Nobody-eg4bi
      @Nobody-eg4bi Месяц назад

      @@freepythoncode dns-seeder

  • @ranjithakrishnan8899
    @ranjithakrishnan8899 Год назад

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

  • @utsavchatterjee4733
    @utsavchatterjee4733 2 года назад

    How can we store those blocks..?

  • @yacoubaabasskabore8999
    @yacoubaabasskabore8999 2 года назад +1

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

  • @aromax504
    @aromax504 2 года назад +2

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

    • @iamrithmic
      @iamrithmic  2 года назад +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 2 года назад +1

      @@iamrithmic correct.thank you for the explanation

    • @jimbrannlund4677
      @jimbrannlund4677 2 года назад +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.

  • @user-tu9ij7to2v
    @user-tu9ij7to2v 5 месяцев назад

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

  • @Kos37376
    @Kos37376 Год назад

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

  • @eugenetsukerman209
    @eugenetsukerman209 Год назад

    And blockchain actually is being stored on the server?

  • @lakshmanpalli2925
    @lakshmanpalli2925 2 года назад +2

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

    • @iamrithmic
      @iamrithmic  2 года назад

      Is this in regards to the previous_proof or proof?

    • @lakshmanpalli2925
      @lakshmanpalli2925 2 года назад

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

  • @shashanksingh4708
    @shashanksingh4708 Год назад +1

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

    • @iamrithmic
      @iamrithmic  Год назад +1

      Will be thinking on more ideas :)

    • @shashanksingh4708
      @shashanksingh4708 Год назад

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

  • @firstnamelastname4685
    @firstnamelastname4685 2 года назад +2

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

  • @mikebeats3281
    @mikebeats3281 2 года назад +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! 🤣😂

  • @yusufhenry9365
    @yusufhenry9365 2 года назад +2

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

    • @iamrithmic
      @iamrithmic  2 года назад +1

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