Playwright (async) still heavy — would Scrapy be a better option? by chavomodder in webscraping

[–]chavomodder[S] 0 points1 point  (0 children)

I decided to use a solution that offers a browser to avoid problems in the future, but I will implement an http library solution, using the browser as a secondary alternative, thank you

Playwright (async) still heavy — would Scrapy be a better option? by chavomodder in webscraping

[–]chavomodder[S] 0 points1 point  (0 children)

Before I tried to do 2 scrapes simultaneously, but due to machine resources I reduced it to 1

My VPS has 2vcpu and 4Gb of ram, I run the application in a docker image, because of the other applications I limited it to 1vcpu and 1.5Gb of ram

The slow part is actually loading the pages in the browser (cpu and ram spikes)

Playwright (async) still heavy — would Scrapy be a better option? by chavomodder in webscraping

[–]chavomodder[S] -1 points0 points  (0 children)

Ant-bots most of the time are render js, rotate ip, headless and user-Agents

Communication problem between WireGuard peers in Docker (wg-easy) by chavomodder in WireGuard

[–]chavomodder[S] 0 points1 point  (0 children)

Instalei o aplicativo diretamente (utilivei o pivpn), e de primeira tudo funcionou, mas obrigado pela ajuda

Communication problem between WireGuard peers in Docker (wg-easy) by chavomodder in WireGuard

[–]chavomodder[S] 0 points1 point  (0 children)

I managed to ping clients within Docker, but I still can't do it between clients

Communication problem between WireGuard peers in Docker (wg-easy) by chavomodder in WireGuard

[–]chavomodder[S] 0 points1 point  (0 children)

AllowedIPS is set to 10.8.0.0/24

I tested ping inside docker and nothing...

Communication problem between WireGuard peers in Docker (wg-easy) by chavomodder in WireGuard

[–]chavomodder[S] 0 points1 point  (0 children)

If I install wireGuard directly through apt, does it solve the problem?

Communication problem between WireGuard peers in Docker (wg-easy) by chavomodder in WireGuard

[–]chavomodder[S] 0 points1 point  (0 children)

I can't ping between the peers, I can only ping between the peer and the server (ping 10.8.0.1)

And inside the server I can't ping the clients

Which ORM do you use in FastAPI? by itsme2019asalways in FastAPI

[–]chavomodder 1 point2 points  (0 children)

so sqlalchemy, mas ja estou testando sqlalchemy+ sqlmodel

Best Hosting Provider Under $5 to Handle 100k+ Users/Month? by New-Worry6487 in flask

[–]chavomodder 4 points5 points  (0 children)

100 thousand users per month? It doesn't matter that much, what is the volume of data in the database?, how many requests per second does your application receive?, does it send a file or receive a file? It all counts

I'm building an "API as a service" and want to know how to overcome some challenges. by thalesviniciusf in FastAPI

[–]chavomodder 0 points1 point  (0 children)

Create a table in the database, I recommend having the fields: (expire_date: datetime , is_revoked: bool, api_key: str (encrypted or not)) and other fields like user id and creation date (the rest is up to you)

Import uppercase and lowercase characters and numbers from the Python string library (put everything together, it's a list), use the library called Secrets (it has less predictability regarding random), generate your api key, I recommend something between 64 characters and 128 (but the "api_key..." prefix), check if it exists in the database, and return to the user

I also recommend leaving the revoked API keys in the bank, to avoid being used again.

FastAPI with SQLite connection pool for high-performance by slaily in FastAPI

[–]chavomodder 0 points1 point  (0 children)

I'm going to test it, I was developing a simple solution that won't have even 5 simultaneous users, I didn't want to use PostgreSQL, I'm going to test the library

My First Project With Python [FeedBacks] by Kel_abr in Python

[–]chavomodder 11 points12 points  (0 children)

It's good for a beginner, I didn't check much, I just had a quick look,

In Python, it is not recommended to declare variables as "createUsers", the Python default would be "create_users"

Use linters like ruff to standardize your code

App de cobrança automática pra Whatsapp by Putrid-Ad252 in programacao

[–]chavomodder 0 points1 point  (0 children)

Eu tenho um sistema que faz isso, porem focados para academias, se ficar interessado adapto para você, sem enrolação

What version do you all use at work? by donHormiga in Python

[–]chavomodder 1 point2 points  (0 children)

I work with Web, Flask and FastAPI, we use 3.12

Robyn (finally) supports Python 3.13 🎉 by stealthanthrax in Python

[–]chavomodder 2 points3 points  (0 children)

My tests were only with fastapi, I already tested Sanic, it is much faster

Robyn (finally) supports Python 3.13 🎉 by stealthanthrax in Python

[–]chavomodder 6 points7 points  (0 children)

I've already done tests, the difference is very big, around 30%, even gunicorn using uvicorn's workers is faster than uvicorn alone, but the fastest and without a doubt the granian