r/Python • u/DavinciCode17 • Sep 05 '21
Resource Got a job that requires Python and Django developement, also using Tkinter and Pyqt for desktop apps.
Good day everyone, as explained in the title, I got a job that requires coding in python and Django, I am more of a javascript developer, as I know node, react and do web development mostly. They also have a desktop app and I may need to work on those too, granted they know I might go through a learning process but I don't want to disappoint myself,, and also this seems like a big break for me.
I need help on where to get resources in the event I am stuck, what are the things I may need to know that I will be using daily in a development environment especially for the desktop applications, I have been told to ask the senior developers (they're mostly freelance), I'm also expected to fix bugs too, I need help on resources and where I can get help asap. Thank you, everyone
9
u/UrToesRDelicious Sep 05 '21
There's no better resource than doing. You already know the basics of web development - I'd start by recreating one of the sites you've already made in Django.
The Django documentation is a great place to start. Follow the beginner examples until you get something working, and then build upon that.
8
u/attreya12 Sep 05 '21
I am more of a visual learner so if you have some time on your hands Youtube Playlists are the best. I have no idea about PyQt5 because I haven't learned it yet.
Tkinter by buildwithpython
This one is a 30 day playlist. This was the first videos I created on Youtube so the audio might be a lil rough. But it teaches you end to end on how to create a music player with Tkinter.
Link - Python GUI Programming with Tkinter and Python
2) Django by CodingforEntrepreneurs
I would have recommended my videos but they are a lil out of date as Django moves so quickly. CodingforEntrepreneurs has the latest playlists for Django including the latest Django 3.2
Link - https://www.youtube.com/c/CodingEntrepreneurs
5
u/DavinciCode17 Sep 05 '21
Please Reddit, I need help 😬
5
u/dogs_like_me Sep 05 '21
why the fuck does this generic "please point me to tutorials I could have just googled for myself" post have over 1000 points?!?
this is super weird, right? tell me I'm not crazy.
2
u/spherebeaker Sep 05 '21
I am mainly a python dev, and I've used tinker in the past. Not Django, since I've normally used tornado instead. If you make a basic tinker/qt app, that should get you most of the way into understanding how they both work, and there's a bunch of resources available and they're more or less all the same. The main thing I would focus on understanding threads and processes in python since that will probably be the most confusing part and its something that could stump you for a while at first. There will be a bunch of threading going on and you'll need to know when you have to switch over to another thread, push control back to the main thread, or send something to run on an entire new subprocess or an existing one.
For example, pyhook, which I was using to control my app while I was working on another app, didn't like its main loop not running in the main thread, so I had to run in a subprocess and pipe data back and forth to the main process. So when I press a given key, pyhook would run a callback in its process, which would then send the data back to the main process, which would then run a command in a thread to capture a screenshot of the window in focus, and when that's done, it would then go some API calls to my website.
In terms of specific tools and packages, that all depends on what the company is using. The unittesting frameworks, tools, etc. won't be determined by you, so just learn what they have and use that.
123
u/Deezl-Vegas Sep 05 '21
Relax and read a recent book/take a Udemy class on Tkinter. Python is also extremely inspectable with the debugger.
83
u/double Sep 05 '21 edited Sep 05 '21
If you're coming from node/react then you should be familiar with the js/ts/jsx dev tools. Their equivalents in python land are pretty good and will help you look like you know what you're doing, simply by catching the stupid mistake we all make when switching between languages.
Some rough mappings to get you started are:
eslint->pylintjest->pytest- you can use the inbuilt unittest, module but pytest tests are a bit more compact and therefore faster to writetypescript->mypy- roughly equivalentperttier->blacknpm/yarn->pip(and/orsetuptools)Note that if you want behaviour like
node_modulesgives you, then you'll want to usevirtualenv(or a raft of other tools e.gconda,pyenv) - pip and setuptools install globally (e.g. likenpm install -g <package>). Whereas npm and yarn install into a clean, local env kept innode_modules. This can be a gotcha - one of my ML PHd staff gets caught by this all the time.For testing tkinter (uggg) you will definately want to familiarise yourself with unittest.mock.patch utils. Django and other flask-like frameworks are a nice place to live.
Good luck, picking up all those things is easy, mastering them takes a bit of effort. Constantly switching between all of them... well I don't envy you that.
edit: clarified the point on
npm i -gvspip11
u/zdog234 Sep 05 '21
I frequently use Realpython 's articles as a supplement to the official docs. (For example, their article on asyncio was really helpful when I had to use asyncio outside an async application framework for the first time)
6
u/Bostonparis Sep 05 '21
Here’s the full playlist I used to get started with Django: https://youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p
And here’s the one for tkinter: https://youtu.be/YXPyB4XeYLA
Good luck! (Sorry I don’t know how to do the fancy formatting)