Don’t worry python is not js, you’re good. See docker, fastapi but depends on what you want to do.
You're right, far less churn than when I came back to js after leaving off at backbone/coffeescript/grunt...
11–17 of 17 posts
Don’t worry python is not js, you’re good. See docker, fastapi but depends on what you want to do.
You're right, far less churn than when I came back to js after leaving off at backbone/coffeescript/grunt...
Disclaimer that basically everything below is a personal opinion: - MyPy is a great (fine, decent) library for typing, but even without it, the type hints in newer python versions and typing standard library are super powerful. Not “rust” levels of powerful but at least on par with typescript - Django is still excellent and now supports async views via asgi. Outside of async, django+DRF+djoser are an excellent choice…
Thanks for the heads up about graphQL—I think I'll avoid for now. It will be for a new project so not a big deal. I just had a quick look at PyTorch... you're totally right this is miles ahead of what I remember. I forgot to ask about package management. Do you use pip, conda, poetry?
Oh btw virtualenv is gone now; you make envs using python -m venv myEnvName
Opinions: 1) mypy is the best type checker, you could look into pylance or pyre though 2) Django's ORM is kinda bad vs. sqlalchemy, but this isn't new. I'd consider any framework where you can use sqlalchemy (most everything) 3) No improvements to interpreter really. In python3 you now have to import reload though :( 4) Celery still exists, it's inside of Airflow. In general "scheduling asynchronous jobs" is a thing…
Thank you! re: sqlalchemy, are there more options for python micro web frameworks like Flask? I enjoyed flask + sqlalchemy in the past.
Disclaimer that basically everything below is a personal opinion: - MyPy is a great (fine, decent) library for typing, but even without it, the type hints in newer python versions and typing standard library are super powerful. Not “rust” levels of powerful but at least on par with typescript - Django is still excellent and now supports async views via asgi. Outside of async, django+DRF+djoser are an excellent choice…
> but at least on par with typescript I wish this were true, but mypy is far behind typescript. For example, mypy has `Literal["foo"]`, but typescript has the ability to template literals like `"foo-${bar}"` etc, and actually understand the results statically. That's not to say mypy isn't great, it has some really good stuff, but I mostly think you're underselling Typescript here.
Earlier quoted context omitted.
Thanks for the heads up about graphQL—I think I'll avoid for now. It will be for a new project so not a big deal. I just had a quick look at PyTorch... you're totally right this is miles ahead of what I remember. I forgot to ask about package management. Do you use pip, conda, poetry?
Personally I love poetry, if for no reason other than making publishing a breeze. If I can’t use it for some reason, I like managing virtual envs with pyenv (not to be confused with pipenv. You’re better off for having missed the controversies around that) Oh btw virtualenv is gone now; you make envs using python -m venv myEnvName
That’s great that some of the virtualenv functionality made its way into the standard library!
Earlier quoted context omitted.
> but at least on par with typescript I wish this were true, but mypy is far behind typescript. For example, mypy has `Literal["foo"]`, but typescript has the ability to template literals like `"foo-${bar}"` etc, and actually understand the results statically. That's not to say mypy isn't great, it has some really good stuff, but I mostly think you're underselling Typescript here.
Huh, good to know. Does this issue apply to f-strings or are you talking about format methods? I did a brief look through issues and MyPy seems to support f-strings fine, but I’d 100% believe that there are still kinks to work out
Direction = Literal["left", "right"]
But this won't work: eft = "eft"
ight = "ight"
Direction = Literal[f"l{eft}", f"r{ight}"]
(Yes, this is super contrived, I bad at coming up with examples, but
https://mariusschulz.com/blog/string-literal-types-in-typesc... shows some realistic examples where it's useful in typescript)