TinyDB in Python - Simple Database For Personal Projects

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

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

  • @machinimaaquinix3178
    @machinimaaquinix3178 4 года назад +2

    This is a great video and thank you for posting it. There are really no other up to date guides on RUclips besides the MIT App implementations.

  • @zt.5677
    @zt.5677 3 года назад

    This is very good. Solid stuff. The purge() > truncate() thing is not a problem at all. Thanks Patrick.

  • @emporiummedia1012
    @emporiummedia1012 3 года назад

    oh man this video just saved me from a huge headache, thanks

    • @patloeber
      @patloeber  3 года назад

      glad to hear this :)

    • @emporiummedia1012
      @emporiummedia1012 3 года назад

      @@patloeber Btw, since you replied so quickly. I have to say that, for calling a specific key of the database, for me it didn't work like User.name, but It did work like User["name"], so in one case its treating it as an attribute and in the other as a key (I think?). A bit confusing...

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

    is there any way to use two different databases in the same file?

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

    How do you get the age number insted of getting everything?

  • @tigron1530
    @tigron1530 3 года назад

    how can i do the same but in a website, i mean like an online database to u can insert in a website table the user data?

  • @noiseus_e
    @noiseus_e 3 года назад

    how does one access these key values however? when you have {name: 'Max'}, how are you able to access Max

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

    hey nice tutorial but i have a problem.
    If i copy your code i get an bad file descriptor error in line 5 "db.insert({'type': 'peach', 'count': 3})".
    Do you know what could be wrong?

  • @DanielWeikert
    @DanielWeikert 4 года назад

    Thanks. Is there any Deep Learning related use case you have used it for? Just curious.

    • @patloeber
      @patloeber  4 года назад +3

      I haven't used it in a deep learning use case so far. I like to use it for example in small projects together with Flask

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

    Hello !!
    I'd like to know if I can use TinyDB with Flask to make it work everywhere for everyone

  • @a.amiracle2579
    @a.amiracle2579 4 года назад

    Excellent explanation, thank you!

  • @rachit6099
    @rachit6099 4 года назад +1

    Thanks for this video

  • @rezayusrilnaufal5319
    @rezayusrilnaufal5319 4 года назад

    hey im having problem with my tinydb, when i tried running it i keep getting an error that says "cannot import name 'tinydb' from partially initialized module 'tinydb'". any help would be really appreciated:)

    • @patloeber
      @patloeber  4 года назад

      Is your import correct: from tinydb import TinyDB. Also make sure that you have NO file in your folder that is called tinydb.py

  • @abhijeetgupta2754
    @abhijeetgupta2754 4 года назад +1

    I love this channel. Thanks for sharing such great content

  • @chachacha1289
    @chachacha1289 3 года назад +3

    First db.purge(), now db.write_back()... Though your video is not that old, it is already outdated. One thing that may be done: in the title, include the version of TinyDB the video is intended for.

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

      db.truncate() worked for me.

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

    Good video, just as an FYI:
    JSON should be pronounced as jay-son not jason
    query should be pronounced as queer-e (long E)

  • @DinaAshraf143
    @DinaAshraf143 4 года назад

    Great tutorial!

  • @sultanakalsekar6800
    @sultanakalsekar6800 4 года назад

    Amazing Bro...

  • @qxch7222
    @qxch7222 3 года назад

    Holy shit, this is so good explained!

    • @patloeber
      @patloeber  3 года назад +1

      thanks! glad to hear that :)

  • @alavinexplore847
    @alavinexplore847 4 года назад

    Nice video

  • @jeanyvesnadal4261
    @jeanyvesnadal4261 3 года назад

    Hi everyone. The video is great but I have some real probleme with Python or Python Community. Well, I come from javaScript and I am learning Python. This language seem like a mess (to be polite). Because purge() was replace by truncate but .write_back() has been remove AND THAT IT and other Python issue! How do you deal with this unstable language?

    • @patloeber
      @patloeber  3 года назад +1

      in this case this is not the problem of Python, but of this third party library tinyDB. Unfortunately it released a new version with breaking changes shortly after my video...

    • @jeanyvesnadal4261
      @jeanyvesnadal4261 3 года назад

      @@patloeber Ok thank you Patrick for your reply and for all your videos.

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

    This doesn't make a lot of sense. If you're dealing with information that fits into a single JSON file, that's just not enough data to require a database.

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

      Then don't consider it a database, consider it a way of keeping information and being able to recall it later.

  • @nemutluturkumdiyeneasphixi9712
    @nemutluturkumdiyeneasphixi9712 3 года назад

    I created a table « Players »
    Each players got « classement »
    I tried so many times to change this « classement » but it’s impossible..
    to find the player i use to write
    Player_table = db.table(« players »)
    Player_table.search(where(‘name’)==name)
    Player_table.update({‘classement’:newclassement})
    But nothing changed

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

      The search has to be in a variable like
      search = db.search(something == something)
      search.update(something)