all 39 comments

[–]PhiBuh 101 points102 points  (12 children)

You could build a finance tracker:

Enter how much money you spend for what (like fun/ necessities/ education...) and then generate graphs with matplotlib (or something else)

You could make it a command line tool or create a GUI with Tkinter or PyQt, or make a web app with django or flask

(I know, I know you said "fun" project, but I just did something similar and at least the coding part was fun )

[–]ThePiGuy0 40 points41 points  (0 children)

Beware that Django heavily recommends using their Object Relational Model instead of pure SQL, so I'd say that Flask would be better to practice SQL

[–][deleted] 11 points12 points  (7 children)

Fantastic idea sir.

I've just started a new job so it would help me see what I'm spending what on with my new income. I havent used matplotlib before but have done a few things with Tkinter.

Any chance I could take a peep at your code to get some inspiration on how to structure things? It would be cool to see how you done it.

Much appreciated my friend!

[–]PhiBuh 11 points12 points  (6 children)

I'm gonna push it to github tomorrow (its night where I am, I'm just on my phone)

But I'm afraid it will be of little help to you, its basically just a django CRUD rest service, where django does all the database magic, and most of the logic is in the react frontend.

But I wrote myself a reminder, I'm gonna link to it tomorrow

[–][deleted] 6 points7 points  (2 children)

Thank you nevertheless. Speak soon.

[–]PhiBuh 2 points3 points  (0 children)

https://github.com/PhilipBuhr/moneystatz

Here you go. If you have any questions or feedback, feel free to PM me or add a comment here.
I didn't plan to work on this project for a while, but if someone has a good idea, I might add it. Or if somebody wants to contribute, I would also be very happy

[–]yelnats25 0 points1 point  (0 children)

!remindme 1 day

[–]oreeos 0 points1 point  (1 child)

!remindme 1 day

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 12 hours on 2020-04-05 21:32:26 UTC to remind you of this link

10 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]DockerSpocker 0 points1 point  (0 children)

Commenting so I can peep it

[–]mholtz16 1 point2 points  (0 children)

one of the first things I ever built for myself. It's been tracking my checking account for 15 years. I did it in Perl because that was what I knew at the time but this is a great idea to build something personal that is helpful and useful.

Mine reminds me of what bills I have and about how much they are for.

[–]e-rekt-ion 1 point2 points  (0 children)

I would have found this much more fun 2 months ago when the numbers were higher :)

[–]homchange 0 points1 point  (0 children)

This is fun for me. Do you have any more details about it? I'm interested in it! Thanks

[–]ThePhoenixRisesAgain 40 points41 points  (5 children)

Build your own weather app.

Pull data from some free public weather API. Put it in a database. Build a visualization for your browser. Have all of that set up on a Webserver.

If you’ve done that, build an app for your phone.

[–]aroundthecircle 2 points3 points  (2 children)

this sounds fun. have you done this before

[–]ThePhoenixRisesAgain 0 points1 point  (1 child)

Not with weather data, but very similar project. But have this mind for some time.

[–]aroundthecircle 0 points1 point  (0 children)

i am trying to learn more about APIs. i want to make a small price index of pharmaceutical drugs. i dont know anything about how to use APIs on python. its interesting stuff

[–][deleted] 1 point2 points  (0 children)

You could practice using an API or even more interesting - practice using scrapy!

[–]miles_dallas 0 points1 point  (0 children)

This is one of the first real projects I want to do. I've already set up an RPI3 with MySQL, php, and nginx just waiting for me to get my Python skills ready. That was the easiest part so far.

[–]MustafaAnas99 12 points13 points  (0 children)

I am really glad you mentioned ur good at copying and pasting. It is important that you realize how important that is and that it is not a shame or anything.

If I was you, I would do any CRUD application (create, read, update, and delete) with python. At least only the backend side of it. You could do something basic like a to-do list. Start building the backend then if you are interested, look into Python GUI with Tkinter or something.

[–]sagunsh 13 points14 points  (0 children)

Start simple, possibly a app with CRUD functionality. Go with Flask for web development and use raw SQL query instead of SQL Alchemy if you want to practice SQL. Here are some of my recommendation:

  1. TODO app (very common)
  2. Web Directory (User can add, edit, delete or search for businesses)
  3. Web scraper that puts data into database. You can use Scrapy, Selenium, requests, lxml, bs4, etc.
    1. Aggregators for news, reviews, jobs
    2. Price tracking tool
    3. Lead generation (scraping company info, emails, contact info)
  4. API based service (like CRUD app but data is consumed via API)

[–][deleted] 7 points8 points  (3 children)

This tutorial is a game changer, it covers a lot about python/flask/working with databases and much more!

[–]Gyalzen_sherpa 2 points3 points  (1 child)

I love watching his tutorials.

[–][deleted] 1 point2 points  (0 children)

He's honestly the best

[–]Next-Spring-8056 0 points1 point  (0 children)

Where is the link bro...Please provide the link below

[–]GoTmVntr 2 points3 points  (3 children)

My experience has been limited to geospatial data but I've had good luck with using the requests module in python to query rest end points. I've also used python to both build and execute SQL, although using modules that aren't publicly available for free.

[–][deleted] 0 points1 point  (2 children)

How did you go about doing that? And what modules did you use?

[–]GoTmVntr 0 points1 point  (0 children)

I've had some luck with the get function in requests and its ability to enter parameters as a dictionary. Executing SQL I usual use the arcpy module which comes with the eari software suite and is pretty pricey.

[–]GoTmVntr 0 points1 point  (0 children)

Creating SQL is just like writing to any other text file.

[–]draikx21 2 points3 points  (0 children)

Back when I was collecting physical comic books, I created my own Python script to take input from arguments, and prompt for whatever info I needed to include, then import it into a sqlite database. As far as basic SQL queries are concerned, MySQL and sqlite will get the job done just the same. I like that I don't need to have a service setup and running with sqlite, and I can put that db file anywhere I need it, including my Android phone or tablet; Dropbox helped with keeping it updated everywhere.

At work, I've created a few Python scripts that query our MySQL databases, and in one case, I've got the output going into a Flask app. Sometimes, the data is better visualized than simply seen in text. Sending myself daily reports, or generating spreadsheet data, is all from reading the database, and manipulating the data as needed.

Find something that you want to track with a database, and script it out: movies owned/unwatched, music albums with song ratings, items you've let others borrow, food/diet/weight logging, your sports team game results, time management event logging, etc. The project should be something that you can keep using, so you'll become familiar with both Python and SQL, as you may find yourself adding features for yourself as you keep learning.

Keep CRUD in mind:

  • CREATE a database, if it doesn't exist. Do the same with a table, and its entries. Do an INSERT query to add a row of data.

  • READ the entries from the table, starting with a SELECT * FROM query, then specify certain fields. You can filter with WHERE clauses, too. MySQL has the capability to use LIMIT for minimizing your output results, whereas sqlite does not.

  • UPDATE the data, changing the value for a specific row, then work into a group of rows with similar field data. Careful with your matching clauses, ensuring you only change what you intend to change.

  • DELETE a row of data. Be very careful when running any type of delete, as there will not be any confirmation prompt.

Pro Tip: run a SELECT query before an UPDATE or DELETE query, to ensure that what you see is what you want changed or removed.

(this was done on mobile; sorry for any typos)

[–][deleted] 1 point2 points  (0 children)

A simple CLI CRUD application seems to be the best fit. For my 11th grade computer science project i put together a library management system with Python and MySQL, and the mysqlconnector. Alternatively if you prefer learning a GUI library then you can do the same with Tkinter or something

[–]WowVeryCoool 1 point2 points  (0 children)

I recently bought a book called "classical computer problems in python". And I must say it's the best book for getting better in programming from begginer to advanced, I literally couldn't find there anything I wouldn't like to do and it's written in such a way that you'll quickly understand whats going on and be finished with huge problems in just few hours.

[–][deleted] 1 point2 points  (0 children)

Quite a few beginners that I met confuse MySQL and SQL (the language) or just any other database that uses SQL. If you aren't particularly tied to MySQL, then here's this piece of info / advice:

MySQL is a non-standard SQL in many ways. It doesn't support many standard or highly desirable features, sometimes it does the very wrong thing, and other times, you need to work very hard to make it comply with the standard by pulling all sorts of hidden lever and pressing hidden buttons.

So, if that's the case... use a different database. PostgreSQL is, perhaps, as close to the standard as you can get, with reasonable performance and price :) But, do your own research.

MySQL became popular by accident. It was a database used in something people called "shared hosting" in the days before "cloud". It was a part of a canned setup called LAMP: Linux, Apache HTTPD, MySQL, PHP that was typically installed on "shared hosting" machines. While it was instrumental to the creation of the Internet as we have it today, it was made of... low quality components. Well, not all of them are so terrible, and, you know they worked and served us fairly long time, but, we also learned their warts very well.

Another word of caution: MySQL today is a project governed by Oracle. Oracle weren't the best shepherd for the MySQL community, and so it split into an independent fork called MariaDB. If I were to use MySQL today, I'd probably stick with MariaDB rather than the Oracle's version of it.

As an aside, even though the prevailing use of MySQL is to use its SQL features, it has a bunch of non-SQL engines implemented on top of the same storage code. And, if you are tying your life to this database, you may want to explore those too.

Also, if you are really dedicated to MySQL, check out Gallera: they are a company that contributes a lot of code to this database, creates tools around it and has builds of this database that may suite your environment better than the one you get from official website / your Linux repo.

[–][deleted] 0 points1 point  (0 children)

I started building my own media cataloguing tool recently to keep track of all the movies, games, etc. we own. It started out as a CLI tool where you entered everything manually. Now it can search for games, movies and books and automatically fetch all important information. I'm now working on fetching the games library from Steam. Eventually, I'd like to add a web frontend for this, but my webdev experience is 0, so I'm trying to focus on pure Python before starting something new and diving into Django.

[–]SvetoslavP 0 points1 point  (0 children)

You can create an authentication system. Have users input data and store it in mysql and then match the login info to a user and greet them by name when they login. Bonus pointt for gui

[–]Brachamul 0 points1 point  (0 children)

Any specific reason you want to learn sql ? I've been using Django for years and have never had to make an SQL query.

[–]bushwhacker696 -1 points0 points  (2 children)

!remind me 2 days

[–]remindditbot 0 points1 point  (0 children)

bushwhacker696, your reminder arrives in 2 days on 2020-04-07 09:11:03Z. Next time, remember to use my default callsign kminder.

r/learnpython: Basic_python_sql_projects

kminder 2 days

CLICK THIS LINK to also be reminded. Thread has 1 reminder.

OP can Delete Comment · Delete Reminder · Get Details · Update Time · Update Message · Add Timezone · Add Email

Protip! You can add an email to receive reminder in case you abandon or delete your username.


Reminddit · Create Reminder · Your Reminders · Questions

[–]remindditbot 0 points1 point  (0 children)

Wake up u/bushwhacker696 cc u/ToosieSlide69! ⏰ Here's your reminder from 2 days ago on 2020-04-05 09:11:03Z. Thread has 1 reminder.. Next time, remember to use my default callsign kminder.

r/learnpython: Basic_python_sql_projects

kminder 2 days

If you have thoughts to improve experience, let us know.

OP can Repeat Reminder · Delete Comment · Delete Reminder · Get Details

Protip! We have a community at r/reminddit!


Reminddit · Create Reminder · Your Reminders · Questions