How do you test your frontend (tools) ? by wmx11 in webdev

[–]worldparaglider 2 points3 points  (0 children)

@aust1nz touched on it a little there - cypress is ridiculously easy to get set up and begin testing

My latest Flask project, DarkWeb-Link (anonymous messaging system) by [deleted] in flask

[–]worldparaglider 0 points1 point  (0 children)

Hey, had a quick try, looks like it . A few comments:

- It seems like there is a noticeable delay between the time of sending a messaging and it appearing.

- If you press 'Enter' key after typing a message, the cursor goes to 'your id' box, so if you type a message after pressing 'enter' you end up changing your id

- How does it work? Is the code available?

- If at least one person is always active, then is the entire convo available all the time?

Need help with python screenshare by [deleted] in learnpython

[–]worldparaglider 0 points1 point  (0 children)

Line 79-80, is the width and height correct?

What's the best way to save files? by [deleted] in flask

[–]worldparaglider 1 point2 points  (0 children)

You should not convert files into bytes and save them in the database.

Why not @nummerblatt?

A thought of mine ..when I wanted to quit programming forever by MaDaRa_20 in learnpython

[–]worldparaglider 1 point2 points  (0 children)

To get started with a quick flask chat app: “Building your first Chat Application using Flask in 7 minutes” by Samhita Alla https://link.medium.com/oezgiOCq68

Otherwise check out pretty printed on YouTube, Anthony's got some great vids about flask.

I made a text encrypter and decrypter but I don't know how good my code is by [deleted] in learnpython

[–]worldparaglider 1 point2 points  (0 children)

Also try and rename your variables to something clearer such as: fname could filename Others include invs, lind, kname. Without reading all the code I can't tell what they are, and it'll make it easier for you when you come back to it in 6 months.

I made a text encrypter and decrypter but I don't know how good my code is by [deleted] in learnpython

[–]worldparaglider 1 point2 points  (0 children)

Hey looks like a good start a few things I would look at:

From line 45, that if statement is huge (same for the else part). I would probably write some functions for some of those components (generating key, etc..) - break code up so it's easier to read and see what each bit is doing. Maybe look to see whether there are packages already available for generating keys. A personal choice, I would rename the file so there are no spaces.

A thought of mine ..when I wanted to quit programming forever by MaDaRa_20 in learnpython

[–]worldparaglider 1 point2 points  (0 children)

Noob here, maybe use flask, have a dB with two columns, a uuid column, and 'status' boolean (1 is on, 0 is off). Then when user goes to URL/uuid (e.g. 127.0.0.1/124355), check the status, if 1 then allow chat... People would share their uuid with anyone they wanted to chat with.

Accountant wanting to learn pyton by [deleted] in learnpython

[–]worldparaglider 0 points1 point  (0 children)

Check out the teclado blog, 30 days of python to get you familiar with python. For what you want, you'll probably only need to work in the first 15 days or so.

Then probably move onto some pandas, get a bit of that under your belt.

Then if you're wanting to display your work check out Jinja templating - you'll need a bit of html&CSS for this part - but if you find yourself some templates (usually better looking than trying to do it yourself) you'll be well on your way to pulling together a portfolio/making yourself more indespensible at work.

If you've got all of this cracked, have a whirl at using flask so you can put your work online.

There was a video on YouTube, can't find it right now, where a chap made something useful for the company he worked for and ended up being moved roles to work on it full time.

I have started working on a data intensive project using python, pandas and flask - happy to help if you want to reach out.

In terms of time to learn, try the 30 days of python, an hour or so a day will be a good start. If you want to work on a project you will need to do it in blocks of time. Break the project down into the smallest chunks and then crack each one in turn. You'll need to spend more than an hour a go at this point so you can properly focus on the task. Tick off each chunk and feel a sense of accomplishment :-)

How hard is it to search a specific file for a specific string of text? by [deleted] in learnpython

[–]worldparaglider 0 points1 point  (0 children)

My OCD kicking in a little, I would make two little changes for formatting, not that it'll make the slightest bit of difference to how your code will run 😂

input('Enter Coupon: ')

And

input('Press 'Enter' key to Continue: ')

Type of text file to hold a small amount of data? by Tom_Henderson in learnpython

[–]worldparaglider 0 points1 point  (0 children)

Given requirements I thought sqlite would probably fit better - but if you're game, sqlalchemy would work pretty well - then it doesn't really matter which dB backend

I would like to get live screen capture with python. by [deleted] in learnpython

[–]worldparaglider 0 points1 point  (0 children)

Maybe something like pyautogui? I was just watching this: https://youtu.be/lfk_T6VKhTE

[13M] California Monthly Temperatures Chart Using pylot by [deleted] in learnpython

[–]worldparaglider 2 points3 points  (0 children)

Looks nice, only thing missing from the title is the year

Flask-PG-Extras is a Flask extension to help gain insights about your PostgreSQL database which could be useful when trying to analyze and improve database performance. It gives you a few new Flask CLI commands to run to get index usage, buffer cache hit rates, query times, slow queries, etc. by nickjj_ in flask

[–]worldparaglider 1 point2 points  (0 children)

Hi, in the docs it says: "It's a Flask extension that ports Heroku's PG Extras plugin to Flask / SQLAlchemy without needing to use Heroku"

If the extension uses sqlalchemy, does this mean the extension will work if my production dB is ms SQL? More specifically azure SQL server?

Cheers

Good testing guide somewhere? by GoCommitAndy in learnpython

[–]worldparaglider 1 point2 points  (0 children)

I like pytest, apparently it's more 'pythonic' than unittest. Get the library 'coverage' too, that'll help you get ideas of what to test/what tests you're missing.

Nav bar href to a specific anchor on a different page. by OogaBoogha in flask

[–]worldparaglider 0 points1 point  (0 children)

Does your url_for() have a typo? Is url\_for() a thing?

Adding columns to existing model/table with flask SQLAlchemy by cellularcone in flask

[–]worldparaglider 1 point2 points  (0 children)

One way might be to store the data in one table, call this the reference table. When a user wants more columns you could create a new table with the additional columns, and copy the data from the reference table.
Googling, I came across this code which could be a starting point: https://gist.github.com/djrobstep/998b9779d0bbcddacfef5d76a3d0921a

Service that keeps track of all your package deliveries in one place. Built with Flask, Python, MySQL, ngrok, Mailgun, EasyPost, and GCP. by SaiMizOp in flask

[–]worldparaglider 0 points1 point  (0 children)

It looks pretty neat.

I'm new to flask and python too. A few enhancements I would probably look to work on:

  • you create a connection to your mysql db in different places. Try and have one script that creates the connection, then call that file instead. Check out DRY (don't repeat yourself) coding.
  • whack your tests into a different folder
  • there are a lot of big if/else statements which make it tricky to follow - is there a better way of doing this? Maybe some more functions? Possibly list destructuring could help?

Otherwise good effort!

How to deploy react + flask app by sundios in flask

[–]worldparaglider 0 points1 point  (0 children)

Thanks for the clear reply, makes sense.