135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
I meant Python Software Automation for instance file automation ,excel automation , API automation and more.....
Читать полностью…
Hi guys, can anyone suggest a python course for automation?
Читать полностью…
The fastest way to learn Python is to get started right away. And if you are confused about something, feel free to ask here. Try a book.
Читать полностью…
How can I learn Python quickly? I feel like it’s really difficult and confusing, and there are so many things to learn.
Читать полностью…
Is it necessary to create a venv even if the project is finished and was working fine?
Читать полностью…
Comparatively perhaps. But doesn't mean you'll become a good developer over night. It's effort nonetheless. I'd rather say Python is pretty and versatile.
Читать полностью…
I understand the desire to get things done, but this particular group is about learning Python. Not commanding LLMs.
Читать полностью…
but but i am found one issue whatever i am taking values form the .env of my python and send it on the @context_processor, but actually the user can inspect and visist the secure private data i send to there using html to js. so no security there he can visit this values i pass over this
I have a question about passing data from Python to HTML hidden fields. When inserting values from Python into my HTML hidden fields, I sometimes need to pass the correct data type. For example, if I have a variable like money = float, I need to send it, but HTML stores it as a string, so JavaScript will try to convert it into an int and use it.
Additionally, consider this regular expression:var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
In this case, how should I take it from Python's backend and pass it into JavaScript, given that this is not a simple string type in JS? Also, if I want to pass this via a Python context_processor, what should the data type be in Pydantic's pydantic-settings?
You pass it to HTML document and grab its value with JS 🤷♂
Читать полностью…
For most RPA scenes I don't think you'll need to take a course, because you simply operate a11y tree and perform UI automation
Just read the documentation of the most popular library
Helllo Flask users,
See when i use Flask, i use like this below code a fun
@app.route("/video/<string:video_id>")
def xyz_fun_to_handle_this():
....
👋 I agree with clouded. You must effort in code. I can help you develop your own project.
Читать полностью…
i was looking into Flask and Flask-WTF today and noticed a recommendation to use CSRF tokens as much as possible. as I understand that even if a page doesn't have a form, we should still check for CSRF on PUT, PATCH, or UPDATE requests, thats' why the token is often placed in the meta head tag.
My question is: when JavaScript fetches data and sends requests automatically, should I attach the CSRF token to these requests?
I read that for automatic JS operations, we can use @csrf.exempt and avoid passing the token. What do you guys think? and i also listen i should never use exept for db query, what do you guys would choose in this case for automatic js request from the browser to server should we impliment csrf token in flask-wtf?
You do not put secrets in frontend
That is a simple rule at least
Depending on how much JS you need to inject, you could consider using .format() on a js as a string and replace the values that way 🤷♂
So you skip all the python > html > js dance
https://docs.python.org/3/builtins/stdtypes.html#str.format
yaa thats looks logical now, i will do serachElementBYID in my js code from a hidden <span> and from there the js will take the value 😅
Читать полностью…
Hello, I was using Flask to build HTML with Jinja and send it to the user's browser like this: 🐍return render_template("index.html", user=user_data, money=users_db.money_value,)
for this case, user and money values are inserted into the Flask template on the fly coming from Python3.
However, when I try to send the/static/js/filename.js
file, it is served automatically. As a result, I have to hardcode each variable in the .js file, since Flask automatically sends the .js file to the user without dynamic context. 😢
var UUID_RE =-Za-z0-9_-]+)/;
var SHORT_RE = ([A-Za-z0-9_-]+)/i;
var HOOK_RE = -9a-f]{4}-[0-9a-f]{12})/i;
var DEFAULT_PROXY = "/api/endpoint/somethign?url=";
var HOOK_API = "/video/web/somethign";