#tools-and-devops

1 messages ยท Page 79 of 1

rapid sparrow
#

they should teach themselves how to code stuff like that

#

from simple to more obscure encrypting algorithms

#

on a more low level

wet dune
#

Yeah. Tht machine will have skme rev shells n privilege escelation stuff. The double base64 is just to annoy em tbh lmao. Imagine the code obfuscated. They will have to figure how to decrypt the rsa key. I tried to make it as simple as possible

#

May i ask wdym

rapid sparrow
# wet dune May i ask wdym

ergh. The code just has too many times repeated base64 encoding decoding. 9 times. It should happen only two times in the code.
too much of repeated open file/read code as well.

And most importantly the code in part two is just terrific student level interface, Could u use normal tool to make CLI interface? Like inbuilt argparse, or preferably click which provides the best CLI interface experience, with automated most comfortable... standards similar to other CLI tools in Linux, and inbuilt help support to navigate which commands exist and which parameters they take
Then usage of program will be up to Linux CLI comfortable standards, which will make the code really easy automatable for any tool

Like program.py key generate

wet dune
#

That code is meant to be for ppl with almost 0 exp

#

Thts why there are so many file opennings and calls to those base64 methods

#

To not make the user jump back n forth

#

Now, applying argparse or any cli lib isnt hard so i can do tht

rapid sparrow
#

click is the best, but requires third party library to install, really easy to eye due to decorators usage, quite pleasant code in result
argparse is default inbuilt one, not requiring any library, that's the advantage it has.

wet dune
#

Ik used argparse lots of times before

rapid sparrow
#

i like click because it allows easily nested commands

#

gathered in groups

wet dune
#

Never used it. Remember using another kne but idk its name

rapid sparrow
#

click is part of flask package, i think

wet dune
#

Got it installed for an example iss tracker project

#

I will remakecit using 2 methods. Encrypt / decrypt

#

Functions*

brazen forge
arctic bridge
#

Anyone know where I could ask some docker/jupyter questions?

tawny temple
#

Here

arctic bridge
#

I am setting up a docker container with the JupyterLabs and trying to set up an accessible drive, using windows 11 & WSL

#

I canโ€™t seem to get anything to work and suspects itโ€™s because I am a moron

tawny temple
#

By accessible drive, do you mean that you want to set up a mount/volume for the container?

arctic bridge
#

Yeah and that be accessible from the desktop

#

I can navigate to the WSL volume but no data related to my container there either

tawny temple
#

In other words, a directory that can be accessed both on your host machine (Windows) and inside the container?

arctic bridge
#

Yes

tawny temple
#

Then what you need is a bind mount. You can use the --mount option with docker run to specify the mount. Is that what you've been trying?

#

Or --volume, either way. Just different syntax

arctic bridge
#

Ok I donโ€™t think thatโ€™s what I was doing, I will look into that

tawny temple
#

Like docker run --volume C:/local/path:/path/in/container imagename

arctic bridge
#

Thanks mark

olive pine
#

does anyone know how to use the tweepy v2 api streaming class?

wise cave
#

hi guys. how do i change the package install to a custom enviroment on mac os? So that everytime I !pip install package it goes to the custom enviro

left girder
#

I like to use pyenv to manage environments on my mac

#

but there's other options too, and people seem to be opinionated about it ๐Ÿ™‚

uneven python
#

Hi everyone!
I was just offered a promotion from Support into a DevOps engineer role. Anyone have any solid resources for getting started? I'd like to have an edge once I begin my training for the new role.

heavy knot
#

Does anyone know any online sprite cutting tools like Alfredโ€™s sprite sheet unpacker?

heavy knot
#

invalid syntax error help me ?

thorny shell
heavy knot
#

shut and up ?

graceful light
#

Is there an existing tool to look at older Python files (like ones for 3.4) and find what they need to have changed in them to work on newer Python versions like 3.9?
Not looking specifically for those version stuff, but a tool that tells you what you need to fix when going from version 3.x to 3.y

rancid schoonerBOT
past onyx
#

hi all, i have a question regarding Github. On my page, it shows that I have 16 repos but I actually only have 7, where did the rest of them come from?

open forge
#

Is there an issue with pip rn? I'm getting

WARNING: There was an error checking the latest version of pip.

In my terminal, but that's all I'm getting. I have an internet connection and I can install packages just fine, and pip is already up to date, so I can't think of what else would be causing this?
I'm on windows on py3.10.4 if that helps

brazen forge
open forge
#

pip and py -m pip ๐Ÿคท

rancid schoonerBOT
#

Hey @open forge!

You either uploaded a .txt file or entered a message that was too long. Please use our paste bin instead.

open forge
past onyx
brazen forge
open forge
#

alright, one sec

brazen forge
open forge
#

When I increased the verbosity it managed to upgrade pip what the hell

#

one sec let me see if the issue is still there

past onyx
open forge
#

oh I'm a dumbass I forgot to include -U when I did py -m pip install -U pip but I did include it when running pip install -U pip

#

My bad ๐Ÿ™

brazen forge
#

other than yours I mean

open forge
#

also since when did pip use and vendor rich?

past onyx
brazen forge
brazen forge
past onyx
brazen forge
past onyx
#

Thanks so much for the help too ๐Ÿ˜„

wet dune
topaz aspen
#

Is it possible to use pre-commit in a nox session without installing the tooling separately ?

Looking at this for example : https://github.com/cjolowicz/cookiecutter-hypermodern-python/blob/main/{{cookiecutter.project_name}}/noxfile.py#L113-L134

the linters etc used in pre-commit are installed with session.install - but this is typically something that pre-commit does itself if it's not been setup, so I'm wondering why this is necessary, seems as though it's duplicating what's already in the pre-commit config.

#

ping me if you respond please

rancid schoonerBOT
#

%7B%7Bcookiecutter.project_name%7D%7D/.pre-commit-config.yaml line 2

- repo: local```
tawny temple
#

Number 2 indeed seems to be the explanation. I skimmed through the article that repo is based on

There is a problem though: The sample configuration pins Black to a specific version, and so does Poetryโ€™s lock file. This setup requires you to keep the versions aligned manually, and may result in failed checks when the environments managed by pre-commit, Poetry, and Nox drift apart.

rancid schoonerBOT
#

.pre-commit-config.yaml lines 1 to 2

default_language_version:
    python: python3.10```
tawny temple
#

But that's not dynamic

dull kiln
#

I'm usijng pyinstaller with a .spec file
and i got these hiddenimports

a = Analysis(['entry.pyw'],
             pathex=['C:\\Users\\ME\\PycharmProjects\\pythonProject\\projectFolder'],
             binaries=[],
             datas=[],
             hiddenimports=["mss", "numpy", "win32gui", "cv2", "win32con", "win32ui", "winsound", "tkinter", "requests"],

but i'm getting ModuleNotFoundError: No module named 'requests'
and i did pyinstaller --clean entry.spec

#

what am i missing?

graceful light
#

So while using black, isort, and flake8 with a project containing Cython *.pyx files with Cython syntax for some commands, black and isort will seemingly work fine, but flake8 will throw false positives since it's not built for handling Cython code
Is there a flake8 alternative I should be using for checking Cython code?
And on a similar note, is there anything I can use with VS Code for handling Cython? I found this VS Code plugin called Language-Cython found on the Visual Studio marketplace, but it makes me apply the language to the file every time I open a *.pyx file

graceful light
dull kiln
#

it turned out that requests just doesnt work with pyisntaller

#

i changed it to urllib and it worked fine

long raft
#

Wait

#

So with RubyGems

#

Bundler and Gems will manage package versions AND the dependencies for the package version seemlessly

#

unlike with venv, if I downgrade a package in my gemfile.lock in Ruby

#

all the dependencies all the way up the graph are downgraded by Bundler/RubyGem

#

seemlessly

#

but my global Ruby Version will have the latest dependency

#

is that right?

#

Is it just me or is that much better than Python?

tawny temple
# long raft Is it just me or is that much better than Python?

Not necessarily. In Python, I believe pip gives an error if constraints cannot be resolved. For example, your program depends on a feature in library A>=2.0, and A depends on B>=2.0. If you downgrade B to 1.0, then A>=2.0 would no longer be satisfied. If A were to be downgraded to work with B==1.0, then your app would break because it relied on a feature in A>=2.0.

dry vale
#

Hey guys, I'm in a selective process for a company, and in the test instructions they say Use of Docker is NOT required but *greatly appreciated*.. The project is mostly a jupyter notebook using pandas. What do they mean by this?

#

Like, have a container for the app? How would that even work?

#

I get it if it was supposed to be made in Django or Flask or whatever, but this makes me confused

tawny temple
dry vale
thorny shell
#

to prove you know Docker? ๐Ÿ˜•

#

or more seriously, to prevent jupyter from modifying your host machine's existing stuff?

tawny temple
#

Maybe it's easier for them to run what you worked on if it's containerised (less work for them to set up a suitable environment with dependencies)

dry vale
#

Maybe

#

I think I'll just upload the .ipynb file to Google Collab after I'm done ๐Ÿ˜†

#

Much easier, same result

#

But thanks guys ๐Ÿ˜„

topaz aspen
dry vale
dry vale
tawny temple
#

I don't think you necessarily need to write your own image. Do you have additional dependencies that the base images don't supply?

dry vale
#

Yes

#

I think so at least

#

Don't think the base images support Tkinter

tawny temple
#

I'm not sure either.

#

It seems to use conda to install Python

#

I suggest you test if the provided images come with tkinter before going through the effort of writing your own.

#

The article you linked for Kotlin doesn't state whether tkinter is supported by that setup.

dry vale
#

Hm

#

Is it a bad practice to upload a venv to GitHub?

#

Instead of a Dockerfile

tawny temple
#

Yes because it won't work

#

venvs are not designed to be relocated to different directories let alone different machines

#

Best practice is to include a requirements.txt with all the dependencies or equivalent if you use a tool like Poetry.

#

I don't know how conda users deal with it though.

#

If that's what you're using instead of pip

dry vale
#

I use pip actually, I was gonna include requirements.txt anyway but since they specifically mentioned Docker I don't know

#

Anyway, thanks ๐Ÿ˜„

dry vale
tawny temple
#

I have never used jupyter so I don't know what the best practices are for dealing with dependencies.

#

In general though, first a venv is created, then activated, then pip install -r requirements.txt. Once all that is done, the actual program can be started

dry vale
#

No worries, thanks!

#

Can anyone explain what the ~= does in a requirements.txt? If I'm planning on the code being usable for both Python 3.8 and 3.9, should I use that operator or <=?

tawny temple
#

It's more of a problem for libraries than for applications though.

dry vale
#

Thing is, technically it should've been written in Python 3.8

#

But I'm on 3.9, since there's virtually no reason for me to be in 3.8

#

So my generated dependencies are for 3.9, therefore I don't know what to do

tawny temple
#

What do you mean by "generated" dependencies?

#

You mean what you get when you pip install a package without a version specifier?

dry vale
#

pip freeze on my venv

tawny temple
#

Oh

#

Yeah locking dependencies with an approach like pip freeze doesn't necessarily work out if you want to support multiple Python versions

#

You'd need a separate pip freeze output for each python version you want to support

dry vale
#

Hm

tawny temple
#

Though you may pick the lowest version and it will probably work fine on later versions

dry vale
#

If I leave just the libs on requirements.txt, will it install the most recent compatible version?

tawny temple
#

If you put the package names without any version constraints then yes, it will install the latest (or use the existing version if the venv already has it)

dry vale
#

Great, thank you! ๐Ÿ˜„

tawny temple
#

But using the latest version isn't guaranteed to always work. A newer version may introduce a breaking change

#

So some people set upper constraints to prevent that. But then that causes other issues. So, it's a complicated topic that the post I linked goes into.

dry vale
#

That's rough

dry vale
tawny temple
#

What I've been doing for applications is essentially a pip-freeze that's generated from some initial constraints (that typically only contain lower bounds)

#

I haven't had to deal with supporting multiple Python versions recently so I'm not sure how I'd handle that.

dry vale
#

Okay

#

Thanks for the help ๐Ÿ™‚

tawny temple
#

You're welcome.

#

Sorry I cannot offer more concrete advice on version constraints. It's a daunting subject.

dry vale
#

No worries ๐Ÿ˜„

dry vale
#

Hey guys, not sure if this is the correct channel, but is there a way to check which of my 3.9 libraries have been ported to 3.10 and "auto install" them?

gentle solstice
#

You can use pip list -o to list outdated packages

hybrid rampart
#

im trying to make a ig tool.can any1 help me..

slate sable
#

Im getting this 405 response, i want to be posting to port 5000, is it not doing that?

left grove
#

Guys I need to use another library in my public project. My project is licensed under Apache 2.0 and the third party library is under the GNU General Public License v3.0. From what I read they are compatible.
I do not want to add this library to the project dependencies, but simply add the folder with the module to my project (so as not to depend on it on pypi, suddenly HE will remove the package).
My question is: what should I do so that I can do everything as described above? I saw some people call such folders "vendor" and add a license to it, is that enough?

latent canyon
#

How to choose a cloud provider for an edtech startup ?

low trench
#

in jupyter lab, can i attach a console to the currently running notebook kernel?

low trench
wooden ibex
latent canyon
latent canyon
wooden ibex
#

Pick one, whatever decision you make will be wrong

flat path
#

It's debatable whether GNU GPL v3's viral nature also applies if you're using it as a standard dependency, but vendoring is 100% going to cause you to run into the copyleft clause

dry monolith
#

I need to deploy (zip files) AWS Lambda functions written in Python to an S3 bucket. Does anyone have a great open source tool to make that easy? I am familiar with Docker and Gitlab CI (in fact we already have Django build and deployments, but I'd need retrofitting and some changes).

urban bay
#

Hi everyone! Can anyone recommend any decent courses/workshops for furure SDETs? CI/CD, performance testing(jmeter/gatling), any additional stuff expected from ex QA moving towards SDET career? :)

old lion
brazen forge
old lion
#

neat, thanks!

warped latch
#

Ive built my docker project having two entirely different configs for prod and dev, and i realize now that this is not the way to do it. It makes prod and dev too different.

#

the django-cookiecutter config is too divided between prod and local for no reason.

rapid sparrow
waxen gull
lusty sigil
#

can someone help me with parallelism in python i'm stuck. I've a project and i need multiple instances running at the same time bot i don't know how to do that can someone explain it to me please ?

waxen gull
lusty sigil
#

yup

#

but for variables lengh of process

waxen gull
waxen gull
# lusty sigil but for variables lengh of process

I like how this guy explains it https://youtu.be/ecKWiaHCEKs

Let's just clear up all the threading vs multiprocessing confusion, shall we? Let's jump in!

Hope you enjoyed the video!

Check out this code here:
https://github.com/ebrian/engineerman/tree/master/036

Join my Discord server to chat with me:
https://discord.gg/k5VcqDP

Check out some code on my GitHub:
https://github.com/ebrian/engineerman

Tw...

โ–ถ Play video
lusty sigil
#

yup but once i start my loop it didn't start the other process

lusty sigil
#

i'm looking it

heavy knot
#

hey

#

I wanna make a tool which will take values from a few live graphs

#

and depending on the values execute action ๐ŸŽฌ

#

how much time will it take me tto complete the project

#

give your answer in hours

thorny shell
#

45 minutes, plus or minus 10 minutes

heavy knot
#

thank you

thorny shell
#

any time

#

disclaimer: that was 100% sarcastic; I haven't the slightest idea how long it'll take; I don't even understand what you're trying to do.

#

Other than that, however, I stand by my answer.

thorny shell
#

thank God

#

of course I need to adjust my sar-cas-o-meter

warped latch
warped latch
#

its number 10 lol

waxen gull
#

But its also set as a way to decouple local and prod so whatever you are working on local and not sure to push to prod yet, don't put in the prod configs until its bug free

warped latch
#

its definitely possible the blame isnt on the config or structure but on my implementation of it... not focusing on treating development like staging by default

#

and to be honest it has local/prod files for too many things.

waxen gull
#

One clear example is the debug value for local. You wouldn't want debug enabled in prod

warped latch
#

right i get that but in the grand scheme, these should be deploying the app to a container on docker that is treated like a production environment. the dev step should use all the same steps as prod except a few things.

waxen gull
#

exactly

warped latch
#

you should just start building for production in development i thnk instead of working on a dev config that you cant use

waxen gull
#

Why would it be in dev config if I can't use it?

warped latch
#

im just saying, spending all this time getting things to work in a dev environment is a waste of time. You dont need twenty billion files to first build the dev app, then build the prod app, almost a completely different app in some ways.

Instead, just build the production app. In the dev environment, flip a few switches, change this to that. But you shouldnt configure an entire series of "For the development version" files from requirements to django settings to different evn files to to different dockerfiles to different compose files.

#

its excessive

#

how they do it in that cookiecutter structure

waxen gull
#

The cookiecutter structure was supposed to not have the switches flipped or be reminded to flip between prod and dev since the configs are separated out from the beginning

warped latch
#

Im just saying, some of the templates ive seen are not in their perfected forms is all.

#

and thats probably true of every docker config ive looked at...

#

it just took me going ove rthem to learn this

waxen gull
#

Not saying you have to follow the 12 factor approach.

warped latch
#

yeah.

waxen gull
#

But it is one of the approach

#

Especially working in teams

#

Where everyone has the same development env set up

#

But working solo, we can do whatever we want

warped latch
#

but even in 12f

#

the configs are tied to the env and everything else falls into place. There is no need for... look at this

#

why not all this in... less files?

#

i like the overide yaml system

waxen gull
#

Not sure what the problem is. It's just extra files.

warped latch
#

its a mess

#

it makes you uncertain what effects comes from where

waxen gull
#

I guess we're different. When I open a linux CLI, I don't see files until I ls them. Otherwise, it's just another blank black screen to me.

#

As long as I know where local and production files are, that's good enough

#

And whatever is supposed to be in production is supposed to be there, is there. local files should stay in dev.

warped latch
#

hm. I mean this is just my first time doing this and the way i did it wasnt perfect.

#

thats really all it is]

#

and i learned some things from it

waxen gull
#

Well worry less about it

warped latch
#

yeah. i just need a break haha

waxen gull
#

I mean

#

You can try and build a django site/app from scratch, the traditional way

warped latch
#

i been at this for like 24 hours lol

waxen gull
#

without the cookiecutter

#

And then just build and extend Django app/site over time

warped latch
#

well nah i think the cookie cutter is a great idea, i just think i might consider some better organizational skills than i did this time

waxen gull
#

Then you'll find the reason behind 12factor approach

warped latch
#

really i think the fault is with me, not the structure

waxen gull
#

it was to solve that struggle

warped latch
#

well the one thing that is making the most sense to me at this point is number ten

#

whcih i definitely did not follow

#

at all

waxen gull
#

but it made sense to you?

warped latch
#

it does make sense to me but I wish i had prepared for production configs sooner and wasted less time working only on the dev environemtn.

waxen gull
#

Well that's what the cookiecutter did. It made the prod configs and the dev configs. So its easier and faster to deploy

warped latch
#

yes but as I built the app, I neglected to work on prod and worked on development configs. In the end, I have to rewrite the app. It was a waste of time. In the future, my dev config will be ....as per number ten of your 12 factors.... essentially a prod config but staged to a stage server/container

#

that is otherwise a prod config

#

and that is where i will develop

#

it wasnt a waste of time...

#

there is no way i would havel learned all the things i learned if i didnt try doing it

waxen gull
#

Cool

pine fern
#

has anyone tried sagemaker serverless? how is it compared to traditional lambda + API gateway architecture?

hearty finch
#

aaah

#

now that rings a bell

heavy knot
#

Hello, im trying to get priority speaker in discord group chats , or to make me louder in discord Group chat ( just a way to lower people and be louder ) Can anyone help me ?

heavy knot
#

How do I merge my master branch to main branch?
I'm a beginner and pushed my project onto github.

rapid sparrow
#

Delete .git, git unit it locally, dump everything into initial commit, and force push to remote

#

Or tinker in github settings online, if they still allow choosing master as master, and just delete main

heavy knot
#

Yeah I mean people use only one branch either main/master but just wanted to know how can I merge my master into main

rapid sparrow
brazen forge
#

you just want to rename the branch, right?

#

or do you have both branches simultaneously?

#

@heavy knot

heavy knot
brazen forge
#

okay. you can just rename your branch though

heavy knot
brazen forge
#
git branch -m master main
git push --set-upstream origin main
rapid sparrow
heavy knot
#

Aight okay

heavy knot
#

Is there a way, by chance, to make the On branch whatever when you do git status show up in all caps or a different color or something? I'm always looking for that tiny line of what branch I'm on but it gets lost in the other output lemon_glass

thorny shell
#

maybe just type "git branch" instead

brazen forge
#

and check for *

thorny shell
#

or use some sort of UI -- many shells have git status stuff built in (ohmyzsh and/or powerlevel10k e.g.)

brazen forge
#

homedir on git pithink

thorny shell
#

sho nuff

#

that way I can have it everywhere

heavy knot
thorny shell
#

heh

#

but I think powershell has plenty of customization too. I put a timestamp into my powershell prompt, but never bothered with git status since I don't git much on winders

brazen forge
#

IIRC oh my posh for Powershell

#

but never really used it

thorny shell
#

"oh my posh"? Heh

heavy knot
thorny shell
#

๐Ÿ’

latent canyon
#

hey , I have this django project deployed on a local server running on docker containers
I'm using nginx to serve media files. It works on my machine , but when deploying to the local server the mediafiles are not loading. Any Solutions ?

mystic void
latent canyon
mystic void
#

all else being equals, it should work

latent canyon
#

How do i set django's STATIC_FILES and MEDIA_FILES location as a directory in another docker container ?To be precise i want to set the STATIC_FILES and MEDIA_FILES location to be a folder in the nginx container ?

shadow crow
#

Is it possible to download the activity data from github as numbers?

#

this thing:

tawny temple
#

I think your only option is to scrape it

brazen forge
subtle quarry
#

I've read and seen examples that the past data can be written to show usage (or not)

narrow slate
#

Is anyone aware of a marketplace AMI which embed a CMS and allow to use a remote postgresql backend using tags or whatever which avoid to do anything from within the instance ?

eternal flicker
south marsh
#

How would I resolve this issue when running pip install -e .? ```
Obtaining file:///home/mart/git/kaudio-python
Preparing metadata (setup.py) ... done
Installing collected packages: kaudio
Running setup.py develop for kaudio
error: subprocess-exited-with-error

ร— python setup.py develop did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> [79 lines of output]
    <...>
    running develop
    /home/mart/.local/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/mart/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    error: ("Can't get a consistent path to setup script from installation directory", '/', '/home/mart/git/kaudio-python')
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

ร— python setup.py develop did not run successfully.
โ”‚ exit code: 1
โ•ฐโ”€> [79 lines of output]
running develop
<...>
/home/mart/.local/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/home/mart/.local/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
error: ("Can't get a consistent path to setup script from installation directory", '/', '/home/mart/git/kaudio-python')
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

south marsh
shadow crow
#

or does is not change anything?

#

thanks, I'll take a look at it

#

I have no idea what GraphQL is so I'll need to do some digging

rapid sparrow
shadow crow
#

yeah I get the idea

#

so I can use the REST API?

rapid sparrow
#

as a pros of this approach, client can query precisely info which is needed. no less, no more
and theoretically more stuff can be queried in parallel in one request

rapid sparrow
#

also small benefit of graphql, that it can potentially decrease amount of endpoints ๐Ÿค” i mean it would be just one endpoint with less duplicated logic perhaps

copper basalt
#

Hello. ๐Ÿ‘‹
I have a slight case of dependency hell which has led me to ask the following question, to which I have not been able to find a suitable answer:
How do you deal with a situation where your dependencies have conflicting dependencies in the same project?
The information I've found for dealing with dependency issues was all about separating into different projects, virtual environments, etc. - but what do you do when you need these things in the same place?

shadow crow
#

you mean, two versions of the same library?

#

I don't think there's a good solution

#

well, you can always run two separate Python processes

rapid sparrow
#

with having requirements.txt only with core deps, and all secondary deps in constraints.txt, it makes easy to resolve conflicts

#

as an option there is also to use pipenv, which sorts of helps with this too, but I still struggle how to solve problems in a nice way in it xD

#

Sometimes i have situation when library is not updated and just can't be used in newer versions

#

in this case I just take this library out of deps and put into my source code folder

#

and update the necessary stuff in it

#

optionally I could have deployed a fixed version to pip though

copper basalt
#

Yeah, I've been doing that, but it's a painful process and I find myself thinking there must be a better way.
I had to update a certain package, which forced me to update another, which forced me to update another, ...
Each one I upgrade breaks some other package dependency, and I don't even want to update the other things that use them - if X and Y were using v1 of Z and now I upgraded Y which makes it need v2 of Z, I still want X to use v1 of Z.
Is there no way to accomplish that?

rapid sparrow
#

u will have less problem then

#
  1. split the service into mciroservices, each one will be having need for less packages to use
#
  1. optionally clean architecture can be used in order to contain implementation details in certain places for easier changes
shadow crow
#

Introducing microservices or any other IPC sounds like a lot of extra complexity if you just need two versions of a package

copper basalt
#

Good advice, but doesn't help with a project that's been around for years already. ๐Ÿ˜…
I'll be working on reducing the dependencies there, but my question is more general and not specific to my project.
Is there a way to make a package use a specific version of some dependency it has while another package uses a different one, all in the same virtual environment?

shadow crow
# copper basalt Good advice, but doesn't help with a project that's been around for years alread...

Is there a way to make a package use a specific version of some dependency it has while another package uses a different one, all in the same virtual environment?
No, that is not possible in the general case.

I guess if the library uses relative imports (like from .bar import baz instead of from foo.bar import baz) you can rename one of the packages into foo2 and still have it work. But it's a hack, and it won't work if it's a transitive dependency

copper basalt
# shadow crow Maybe `justuse` can help in some way? <https://pypi.org/project/justuse/> its RE...

Thanks for the suggestion. I checked it out just now and found this:

np = use("numpy", version="1.21.0rc2", hashes={"3c90b0bb77615bda5e007cfa4c53eb6097ecc82e247726e0eb138fcda769b45d"}, modes=use.auto_install) inline installation of packages and importing the same package with different versions in parallel in the same code - most people wouldn't even dream of that!
This is quite interesting and potentially promising (assuming it actually works).
Now, if there was a way to take a module and redirect its import statements to use a similar mechanism to take the right version, that'd be great.

One thought I had was to map the dependencies in some file, then wrap imports in code which temporarily places you in an environment where the expected packages have the right versions installed.
That is, continuing my example from above, you'd have both v1 and v2 of package Z installed somewhere, and you replace import X with X = myimport("X"), which would then point the module search so that importing Z would lead to your installation of v1, just for the duration of performing the import, in order for the loading to get the right thing.
And similarly it would point it to v2 when doing myimport("Y").
But that would only work on the top level, as I can't go and replace import statements in external packages.

brazen forge
#

you could ask the authors, which are regulars here. @greyblue92 and @amogorkon

shadow crow
#

cc @next spruce

#

do you know if justuse can help in this case?^

rapid sparrow
#

just copy the package into your source code folder

#

and rename it being a different one

#

woala. U have two packages of same thing that can be even different versions

#

A bit of a WET solution, but if we will explicitely forbid changing code in this package, I think it is sort of a solution

#

although technically it is not WET, since both packages will still not be containing any of your code ๐Ÿค”

#

it will be just a different way to install package

#

slightly dangerous due to possibility for you introduce changes into it, that will be hard to track if you decide to upgrade the package

thorny shell
copper basalt
copper basalt
# rapid sparrow and rename it being a different one

That would work for having multiple versions, yes, but it wouldn't solve the issue of your dependencies needing to use said versions, as they only have "import whatever" rather than whatever name you gave them.
But that's the basis of what I said, sort of. Having multiple versions available, then redirecting the imports to the right ones.
It doesn't need to be in your project though, just some folder you create when you do your setup and install your dependencies.

rapid sparrow
#

but also the parent dep

copper basalt
#

Yeah, it gets complicated when you take multiple levels into account. =\

rapid sparrow
# copper basalt Yeah, it gets complicated when you take multiple levels into account. =\

Anyway. Your situation starts to sound similar to this funny interview https://www.youtube.com/watch?v=Uo3cL4nrGOk

Javascript programming language
Interview with a Javascript developer in 2022 with Jack Borrough - aired on ยฉ 2022 The Javascript.
https://imgur.com/a/PnaZq1F

Find more Javascript opinions under:
https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f

Programmer humor
Javascript humor
Programming jokes
Programming memes
Ja...

โ–ถ Play video
rapid sparrow
#

https://jjquery.io/ bwhaha. Someone had a humor and created web site in honor of the video above

shadow crow
copper basalt
sonic elk
#

Hey guys I have a question about GIT and VSC :
I just installed Windows. git is also installed. i am cloning a repo then making a change. nothings come up here :

#

It was not like this before my windows formatting

narrow slate
#

Does someone retrieve secrets from AWS secretsmanager through ansible ? I have a hard time achieving to do it, the lookup plugin don't find it even if I force all envs while I can retrieve it with the cli ๐Ÿ˜ฆ

#

in fact the lookup return not found if the secret exists but is empty ๐Ÿ‘Œ

gentle solstice
ivory bobcat
#

Is this for like libraries and ide extensions we make

#

Cuz like Iโ€™m not terribly great at making stuff but Iโ€™m pretty good at making stuff to make stuff with

sonic elk
gentle solstice
#

reloaded the window? (Ctrl+P, "reload window")

sonic elk
gentle solstice
#

Could it be that the "publish to github" prompt is blocking any git operations?

#

press esc until it goes away

misty sorrel
#

so I deployed a flask application on nginx (ubuntu vps) and connected a mysql database to it
its up and running but every other functionality except login is working
I used flask login for saving the user session
everything works properly on my local server

#

but here the session is not being saved

rapid sparrow
#

Why people use pipenv?!

#

it is not showing dependency errors in detail! This tool suggests me only to install stuff with --skip-lock and checking manually what the hell went wrong in pipenv graph

#

in regular requirements.txt+constraints.txt it is much easier to handle

thorny shell
#

what is "constraints.txt"?

rapid sparrow
#

you point stuff necessary to install in requirements.txt without secondary deps

#

you can even point requirements.txt without versions at all xD they are locked in secondary deps anyway

#

makes relatively easy to handle deps i think.
we just regulate requirements.txt file, while having a free reign in constraints

#

it is technically really similar to how pipenv works

#

we just use pip default functionality

thorny shell
#

I started using pipenv because it's from Kenneth Reitz, who made requests, so I figured it'd be equally awesome. It isn't. ๐Ÿ˜

waxen gull
#

Is a Github Token the same as Personal Access Token?

brazen forge
#

GitHub does use PATs. or do you mean a deploy token?

thorny dome
#

In Mac OS 12 terminal, python commend cannot be recognized, but python3 can be recognized, anyone know how to fix this?

thorny shell
#

get used to typing python3 instead of python is probably the best way

#

it's not broken; why do you want it "fixed"?

brazen forge
#

well, you could also symlink or alias python to python3

#

or install python from homebrew, which uses python and you can put it ahead in the path

thorny dome
#

Thanks~

waxen gull
brazen forge
heavy knot
#

can someone help me with this after i convert it into exe ?

#

please

finite fulcrum
heavy knot
#

how ?

#

please

finite fulcrum
#

don't pass the flag that disables it

heavy knot
#

ai need something put

finite fulcrum
#

It's from the line you used to build th app, not in the app iteslf

heavy knot
#

like this ?

finite fulcrum
#

don't do the -w

heavy knot
#

how can i add more script into one exe ?

#

bcs it open onlY one script after that when it will go to menu list it will close

#

i send it friend and he only got opened login

prime grail
#

So I am trying to build a Dockerfile and I get this error...

Here is my Dockerfile

FROM python:3:10-slim-buster

WORKDIR /api

RUN pip install poetry

COPY pyproject.toml /api
COPY poetry.lock /api

RUN poetry install

COPY . /api

CMD ["sh", "launcher.sh"]

This is the traceback

Sending build context to Docker daemon  23.38kB
Step 1/8 : FROM python:3:10
1 error occurred:
        * Status: invalid reference format, Code: 1
brazen forge
#

3.10, not 3:10

prime grail
#

ah tysm

steel sundial
#

Question: In Sphinx, where is the builder_name added to the build directory?

Eg: buildir /docs becomes /docs/html when building with the html-builder.

โ€”โ€”โ€”โ€”โ€”โ€”โ€”โ€”
Using the recommended make-mode aka -M.

I have combed through the source code without finding it where it actually modifies the outdir.

The reason is I am building for Github-Pages and the trick with the redirect inside an extra index.html seems to be breaking some stuff (mostly css for some reason).

I wrote a little sphinx wrapper because I also am doing other things not possible with base sphinx. This currently builds to an temp dir and then copies it to the docs folder directly with no html subfolder.

It works but if I could just fix that by sub-classing/custom-builder/extension/โ€ฆ I would rather do that, as the current solutions is quite duct tapey and also makes sphinx console output non-sensical (your files are in <temp-dir>/htm/ for example)

Anyone has some knowledge about sphinx internals, and can help me?

feel free to ping/@ me when answering!

fickle bough
#

Umm if links are prohibited, I'll copy paste the whole post over here

spice pulsar
#

I am creating a python library. I have put detailed docstrings with examples in all functions. Which tool can I use to generate documentation from these docstrings

#

I want this documentation to be available/readable on Github

#

So I guess it needs to export it to .md files? I'm not really sure about this part

loud bear
#

With mkdocstrings

#

Very ease and simple

#

Make sure you adhere to a doc style like google or numpy or whatever else there are

spice pulsar
#

Thanks. I'll check it out.

brazen forge
#

that's something you should ask in an off-topic channel

pure narwhal
#

Hello, guys!

Can anybody recommend some solutions for monitoring cron jobs?
I saw some paid options but prices were too high.

Looking for free self-hosted or cloud solutions with moderate price for small amount of jobs (up to 100 cron jobs/up to 1000 runs daily)

From my perspective, there is a free self-hosted option of grafana + timeseries db, when every job contain formatted output with result of job result (datetime, duration, name of process, high level exec result, low level exec result, etc) and this output will be redirected to our timeseries db. after that we put this data to grafana. We getting dashboards for cron jobs + option of alerting on unsuccecful runs or too long runs.

What do you think about that? What do you use?
Appreciate any advice or thoughts ๐Ÿ™

rapid sparrow
pure narwhal
stuck citrus
#

what is the best way to use all the linux commands in the windows terminal?

thorny shell
#

WSL

#

for some value of "in the windows terminal"

#

with WSL, you can run "bash" exactly the same way you'd run "cmd" or "powershell", and it's either 100% pure Ubuntu Unix, or else so close that I haven't noticed the difference

#

[not that I've spent a lot of time with it, but it's pretty impressive]

red locust
#

sudo chown myuser /usr/local/var/postgres/ is this location for mac?

#

i saw this on stacksoverlfow, and unable to resolve issue

#

this is the error

#

i am using ubuntu on windows

#

i have to urgently install an application, as asked by my professor

thorny shell
#

you have to figure out which package includes postgresql-setup, install it, and figure out the directory into which that file goes

#

I just tried apt-file search postgresql-setup and it returned nothing which suggests there's no Ubuntu package that includes a program of that name ๐Ÿ˜ฆ

#

I think the instructions you're reading are

  • for Fedora, not ubuntu; and
  • pretty sloppy
red locust
#

basically as a someone who just downloaded ubnutu, i am ...., right

thorny shell
#

so you can tell this is not super-professional documentation

red locust
#

i am following this to reinstall:

#

is it ok?

thorny shell
#

how would I know?

#

if you are following their instructions and you've got a working postgres setup, then they're OK; if not, not.

#

I glanced at it and it looks reasonable; that's all I can say

red locust
#

according to professor instruction:

#

is this cosistent with alternate aproach to installation

thorny shell
#

๐Ÿคท

red locust
#

?

thorny shell
#

ask your professor then

red locust
#

๐Ÿ˜ข

thorny shell
#

the postgresql12 package contains a file named /usr/lib/postgresql/12/bin/initdb. That probably does what postgresql-setup initdb does. Try it and see.

#

if that advice turns out to be useful, the lesson is: Ubuntu's "apt-file" program is super-handy; ask me for details.

red locust
#

ok trying

red locust
#

what to choose?

#

shows installed in 14.4 version of postgresql

thorny shell
#

I haven't the slightest idea

#

I don't use postgresql. and I don't know what your instruyctor had in mind

red locust
#

if i ask the professor, he might be dissappointed

thorny shell
#

well no offense but I don't want to study that repo in order to answer your question

red locust
#

my pc+my brain is going hay wire

thorny shell
#

well, your brain will cure itself if you take a rest. Your PC, though, I can't help with

red locust
#

havent cried in years, seems like record gonna break

tawny temple
#

postgresql-setup seems to be specific to the way rhel/centos/fedora packages postgres. Since you're using Ubuntu, you won't have that. initdb should be sufficient. https://www.postgresql.org/docs/14/app-initdb.html

thorny shell
#

yeah we've been through that

tawny temple
#

Sorry, I suppose I don't understand what the current problem is then

thorny shell
#

OP got initdb to work, but it's interactive and they don't know what to click on

tawny temple
#

Weird. I guess Ubuntu does things differently too

red locust
#

ok please tell me one thing

#

what type of location is that

#

is it mac?

#

how does it translate

#

i have located initdb

thorny shell
#

can't tell for sure

tiny jungle
# red locust

sudo and the /usr/ path format are unix/posix-based only, so mac and linux

#

though it appears for you that postgres follows similar paths in windows

brisk kettle
#

fwiw on my mac my ~ is /Home/username

red locust
#

So do i need to enter from c: uptill bin for windows?

tiny jungle
red locust
#

Ok thank you,

velvet spire
#

I'm trying to connect to a python language server from python, are there any lsp clients written in python?

#

also how can i run a language server independently ๐Ÿ˜…

thorny shell
#

sounds like something google could answer

velvet spire
#

sounds like i asked here intentionally since someone might have an answer

#

(i already googled it and spent quite a while but didn't find a result)

thorny shell
#

best to say that up front, to head off smartasses like myself ๐Ÿ™‚

#

how to run it independently: the one that I use is just a python module, which you just run from the command line, and iirc it just sits there either listening on an IP port, or else reading from stdin

#

I bet pylance works similarly

velvet spire
#

which one do you use?

thorny shell
#

I actually have to check! Hold on

#

python3 -m pip install 'python-lsp-server[all]'

#

my notes also say Beware: there's also a "python-language-server" but it's flaky and abandoned

velvet spire
#

ah and which editor do you use to interface with that?

thorny shell
#

Emacs

#

not recommended for normal humans

#

pretty sure pylance is what you want; it's the default for visual studio code, and I've never encountered, nor heard of, any problems with it

velvet spire
#

what i'm doing is making an api that interfaces with a language server

#

this is not for an editor :P

thorny shell
#

when you say you "didn't find a result", did you mean you didn't find anything that actually worked, or ... ?

#

because

velvet spire
#

that was maintained*

thorny shell
#

ah

#

that is easy to believe ๐Ÿ™‚

velvet spire
#

might have to roll my own

thorny shell
#

I assume 99% of the interest in LSP is for editors, and I assume 0.0001% of editors are written in Python

velvet spire
#

my goal is an api which can return introspection on provided code and other tools

#

it won't be a public api, I'll be using it with another project

#

embracing lsp means I don't have to worry about the hard parts and can switch it out as well

#

i found this so post

jaunty wren
warped latch
#

Lets say ive been working on the same project in two repos.. and im now tired of switching back and forth. I would like to add one repo into a dir called old and merge that into that old one. But im having trouble getting it to "merge two unrelated histories"

Advice/guides on how to go about this?

#

or some other way i could slowly go over both in the same project and keep the best of both. keep in mind, these projects have entirely different structures despite solving the same problems

brazen forge
#

ideally the old and new should have been separate branches instead of repos

#

git does have a way to merge unrelated histories IIRC

misty ice
#

Guys anyone familiar with configuration management in DevOps, having a hard time getting my head around what it does for the process?โ€ฆalso do we use tools for this too? Since we want everything to be automated?

thorny shell
#

awfully broad question

#

that's like asking "Hey anyone here a doctor? How do you do brain surgery?"

misty ice
thorny shell
#

just ask a more specific question

misty ice
#

Youโ€™re hilarious man

#

Iโ€™m trying dude ๐Ÿคฃ

#

CI/CD is hard enough

#

Then IaC - this stuff never ends ๐Ÿ˜‚

thorny shell
#

"what does it do for the process"? Automates it, obviously. That's good because it reduces the risk of accidents caused by humans typing the wrong thing.

#

"DO we use tools for it"? Of course. Ansible, Azure Dev Ops, Github actions, AWS surely has something, &c &c

misty ice
#

Thanks man ๐Ÿ™

thorny shell
#

I don't do all devops every day, but sometimes it feels like it (spoiler alert: I much prefer regular coding)

misty ice
#

Trying to get my head around the term โ€˜pipelineโ€™ as Iโ€™ve been reading it a lot. I hear it in many things. Like DevOps pipeline and CI/CD which is also apart of the micro services architecture too. I read just under this page with the title โ€˜CI/CD pipelineโ€™

#

The first sentence is

thorny shell
#

yeah it's pretty vague

misty ice
#

โ€˜Your pipeline is the path your code travels from development to production.โ€™

#

Is this the case for all pipelines?

#

Like when I read the word, pipeline, is this what I should be visualising ?

thorny shell
#

I'm familiar with Azure Dev Ops pipelines, which is basically a super-complex process whose point usually is to take code you've checked into a git repo, and get it running on a machine, or machines, "in production", often with intermediate stops on "development" and "integration" machines

#

yeah that's roughly how I use the word pipeline too. But I bet you'll find people using it to mean slightly other things as well; it's a relatively new concept (I don't recall people talking about pipelines 20 years ago e.g.) and the definition hasn't quite settled down yet

misty ice
#

Thanks for your help man. Really helpful good answers

thorny shell
#

I think the best way to learn about a tool like this is to not use it, and suffer; eventually you'll say "geez I wish there were a way to automate all this crap". At that point you'll be receptive to the idea ๐Ÿคฃ

#

... and if you never find yourself complaining like that, then pipelines probably aren't for you

#

I'm 100% serious here

misty ice
#

Alright Thanks man ๐Ÿคž

thorny shell
#

if it helps any -- if you're good at this you can get paid a lot of money

misty ice
thorny shell
#

that's another way of saying it's hard --

If it were easy, everybody'd be doing it

  • A. Berg
red locust
#

so, finally was able to start initdb by sudo service postgresql start
but what do i do about systemctl
a little search indicate it require extensive hacking for working on windows?
are there alternative to systemtcl steps

thorny shell
#

if you have "service", that's roughly equal to systemctl

red locust
#

wininit i have heard, and wwould scm

#

would it suffice? also the second step is done right ? if it says:

#

i think i have installed 2 version and it start both

#

right?

strong dew
#

how would you ban a specific string (TODO in this case) using pre-commit? It seems the fail language can only ban commits with filenames that don't match rules?

#

I think I will try a local hook with the 'pygrep' language

wheat furnace
brisk kettle
leaden lotus
#

i use pips and imports so i donโ€™t have to copy paste raw package code

subtle quarry
#

That's smart!

brazen forge
#

you should open a help channel. this doesn't seem relevant to this channel

civic grove
#

is there a tool for jupyter note book to play a sound when running a code cell finishes

#

dont wanna waste my time having to keep checking on it

indigo zenith
civic grove
red locust
#

help

#

^

thorny shell
#

have you tried adding the exception like it says?

#

disclaimer: I never use phusion; I'm just reading the error message

latent canyon
#

How to mount directories in docker-compose file ?

latent canyon
#

What does this mean in docker-compose.yml file : - ./static:/etc/nginx/static ??? ๐Ÿค”

full bronze
#

Looks like it does something from ./static and applies that to /etc/nginx/static. Probably a copy or perhaps mounting a directory

brazen forge
#

yes, that does a bind mount by default

tender current
#

I'm running conda 4.12 on WSL2-Ubuntu20.4 and trying conda env export > environment.yml, which fails with InvalidVersionSpec: Invalid version '1.12.0<2': invalid character(s)
This seems to be a popular solution, but I don't have a nb_black at that location https://github.com/conda/conda/issues/9624#issuecomment-737107961
And this one provides a workaround for not having nb_black, but it's for windows ๐Ÿ˜•
https://github.com/conda/conda/issues/9624#issuecomment-777160270

Does this command work for you? Please ping me if you reply

steady wraith
#

hey can anyone help me on which Plugs should i use in neovim for python development

brazen forge
subtle quarry
sterile oracle
#

hi

#

how to connect thonny and QT Designer

stuck citrus
#

can someone help me with pyautogui

latent canyon
#

Any ideas on solving this error :
Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
Tech stack :
web server (reverse proxy) : nginx , application : django , application server : gunicorn & Docker.

abstract cape
#

Does anyone here have a working docker setup that can run GUI applications? I'm on Ubuntu 22.04 and none of the SO answers/blog posts that seem to have worked in the past work for me. Can't get tkinter to find my X server even after stripping away all security layers.

rapid sparrow
#

the most close to GUI is obviously web UI at localhost somewhere available

abstract cape
# rapid sparrow Docker can run only CLI, TUI, and web UIs

It's been done in the past. You can share your display server socket with docker. If you don't believe me: https://www.youtube.com/watch?v=cMsIT2otEjA

In this video, we will see how to create a GUI app image and run it in a container using X display of host machine. It will not work on Windows.

Please email dotslashrun.sh@gmail.com, if you need training on docker.

โ–ถ Play video
heavy knot
#

Hey! I'm currently using Pyautogui to automate a program. I'm running my script on a vps, but when I close the connection to my vps it stops working. I'm using .write(), .moveTo(), etc.

heavy knot
subtle quarry
heavy knot
thorny shell
#

tmux prevents your program from stopping when you close your VPS connection

#

now, if it's a gui program I'm not sure it'll work

#

is the "connection to your VPS" a web page, or some program you run at the command line, or what?

subtle quarry
heavy knot
#

My script doesn't stop when I disconnect from my VPS, but Pyautogui doesn't work because there is no active connection or something like that.

heavy knot
thorny shell
#

ah gotcha

#

well ...

#

I don't know why your program stops when your RDP connection drops

heavy knot
past hound
#

can anyone tell me if my understanding of docker is correct

#

so ive been trying to learn docker for a while now and I get the basics of docker and docker-compose

#

so if I containerized my app using docker and want to deploy these are generally the steps I would have to follow

#
  • create a docker image that would contain my application
  • push the docker image to some docker repository
  • on my cloud service (digitalocean, aws, gc, whatever...) I would pull the docker image from wherever I pushed my docker image to and simply just start the docker container?
tawny temple
#

Yes

past hound
#

would I have to do any additoinal config relating to networking side?

#

also would it be better if I developed my application first and then dockerized the app or should I just dockerize the app from the start?

tawny temple
#

Depends on how exactly you deploy it I suppose. Like, if you deployed it just to a VPS then you would likely need to configure the firewall, among other things. But a VPS is typically not the most cost-efficient way to deploy containers anyway.

past hound
#

which process is better?

#

whats the best way to deploy a docker app? I should use something like AWS?

#

I see lots of people recommending DigitalOcean

tawny temple
#

Cloud providers typically have services that let you deploy an image directly

past hound
#

I just want to build a dead simple app, dockerize it and deploy it just to understand the basics

#

cloud providers you mean like AWS, Azure, GC etc...?

#

if I deployed to AWS, would I still need to configure firewall and additional other security measure?

tawny temple
#

Again, depends on how you deploy it. There are multiple ways to do it.

#

For example, AWS has Elastic Beanstalk which can be used to deploy containers. They also have AWS App Runner, which is a simplified version of Beanstalk. These approaches require less configuration than if you were to just use EC2.

past hound
#

is EC2 a VPS just like having DigitalOCean server?

tawny temple
#

Yes

past hound
#

I remember using AWS a while ago but it was confusing as hell

#

even to do something very basic

tawny temple
#

AWS is just an example. Other providers have similar offerings

#

I'm just more familiar with AWS so I used it as an example.

past hound
#

would I have to push my docker image to the AWS docker registry or can I push my docker image anywhere?

tawny temple
#

IIRC for AWS App Runner it only supported automated deployments for images on ECR, their container registry.

#

Not sure about Beanstalk. You'd have to check their docs.

past hound
#

ok no owrries. appreciate the info. much love

tawny temple
#

In any case I believe ECR is free if you push the image to the public repo. The cost is when you want it to be private.

#

Well, free as in up to a certain limit

past hound
#

if I push my docker image to ECR and make it public then I can host the dockker image for free on EC2?

tawny temple
#

nope

#

ECR and EC2 have separate billing

#

And if you use EC2 directly you don't necessarily need to use ECR

past hound
#

oh so you're saying its free to deploy my docker image to ECR for free if i make it public but I still have to pay for EC2?

#

oh right that makes sense

#

that means I can just deploy to dockerhub or wherrever and use EC2 separately?

tawny temple
#

Beanstalk and App Runner have more integrations for automated deployment and at least for App Runner I am sure only ECR was supported.

past hound
#

My only concern with AWS is unexpected high costs... I read some horror stories where some users are racking hundreds of dollars unexpected bills

tawny temple
#

I suppose that can happen with any cloud provider.

past hound
#

like if you dont know what you're doing you can be hit with some gnarly usage fees

tawny temple
#

In AWS you can set alerts and limits for your billing

past hound
#

thats what scares me to be honest

#

I dont think DigitalOcean has that issue. at least I dont' thiink so

tawny temple
#

Well AWS only charges you for what you use, so if you unexpectedly use a lot, then you will be charged a lot.

#

It's not like a flat rate

past hound
#

well I wouldn't expect my app to receive high traffic but once you share it publicly to users, there will be someone who will try to exploit your application

#

which is what happened to someone

#

someone ran an infinite loop which was constantly hitting their api which racked up some hefty costs

tawny temple
#

That's why one should implement rate limits for their API

past hound
#

yea but for someone who might not be too experienced this could be a very costly mistake

#

๐Ÿ˜ฌ

past hound
#

im trying to open my app at localhost:8000 but keep getting Unable to connect to localhost:8000

#
CONTAINER ID   IMAGE                        COMMAND              CREATED         STATUS         PORTS                                                 NAMES
f8ed60d8a39b   prakhar1989/foodtrucks-web   "python3 ./app.py"   6 seconds ago   Up 4 seconds   5000/tcp, 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp   foodtrucks
#

but should be the correct port? what am I doing wrong

heavy knot
#

my process memory scanner

dusky mantle
#

there are a lot of values with "5" :P

heavy knot
#

ye

serene notch
#

hey guys, wonder if anyone can help me maybe guiding me or providing me some inputs on this. My end goal is to implement a pipeline in Azure DevOps that executes usual python steps (code validation, tests, etc) and deploy or make the updated version available to be deployed to my server. As my environment is still based on servers, not containers, I am wondering how I can accomplish this.

Whatยดs still not clear to me is the actual "code deployment" to the server. Thatยดs what I have in my mind for the pipeline:
code quality validation (flake8, black, isort), tests, etc
once this all passes, it would either move the code to artifactory and then deployed to the server ( itยดs not container )
Should I have something on the server itself being triggered to download the latest version of the artifactory?

Appreciate any tips, articles or recommendations.

Thanks in advance

tawny temple
serene notch
#

not sure if this is an unusual setup. This is a new environment to me, so tyring to see how I can make this a good solution considering devops good practices

tawny temple
#

Is the server connected to the internet? If so, then you can set it up to run sshd and connect to it over ssh via Azure Pipelines.

heavy knot
#

Could someone tell me what devips is

#

Devops

serene notch
tawny temple
#

Yes. In fact, Ansible ultimately operates using SSH. If you simply need to move some files then Ansible is overkill. But if you have a lot of other things you need to provision on the server, then check it out.

serene notch
finite crest
#

hey guys i have a lot of python files which writes to a log files
and these python files mostly talk to a elasticsearch db
i was wondering about what would be the best approach to monitoring these logs
like getting an email or sms when i get a error or debug log level
I checkout out the logstash
but grafana does sound like a good option as well
or maybe a self hosted sentry
any ideas please?

mystic void
heavy knot
#

`print("1. Tool Help")
print("2. Tools List")

import keyboard
keyboard.on_press_key("1", lambda _: print("Test"), suppress=False)
while True:
pass`

I want that u only can type the "1" one time
to open the "Tool Help"

carmine dirge
#

Hi, given project structure (name-spacing):

root/
    sub1/
        namespace/
            __init__.py
        pyproject.toml
    pyproject.toml

Can I specify in the root/pyproject.toml somehow the local sub1/pyproject.toml as dependency?
(Couldn't find anywhere in documents. If someone can point out doc that says that, I'm all ears)

#

Additional question: Can I specify somehow sub*/pyproject.toml as dependency?

#

Essentially, what I want is to be able to do is pip install -e . in the root folder

hallow gull
#

Does anyone know how to cross compile a Python executable? I want to cross compile for aarch64-pi while on an amd64

past hound
#
โžœ  server sudo docker-compose up
WARNING: The PWD variable is not set. Defaulting to a blank string.
Removing server_caddy_1
Recreating e18c48c71aed_server_caddy_1 ... error

ERROR: for e18c48c71aed_server_caddy_1  Cannot start service caddy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for caddy  Cannot start service caddy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
version: "3.7"

services:
    caddy:
        image: caddy:latest
        restart: unless-stopped
        ports:
            - "80:80"
            - "443:443"
        volumes:
            - $PWD/Caddyfile:/etc/caddy/Caddyfile
            - $PWD/site:/srv
            - caddy_data:/data
            - caddy_config:/config

volumes:
    caddy_data:
        external: true
    caddy_config:
brazen forge
#

have you tried ./Caddyfile:/etc/caddy/Caddyfile?

past hound
#

yes tried that also

#

didnt work

brazen forge
#

because from the error message it seems like Docker Compose doesn't recognize $PWD

past hound
#

im following the exact steps in the docs

#

if i remove the volumes in docker-compose file then everything works

brazen forge
#

what OS? what shell?

past hound
#

if i change $PWD to just a .

#

then the WARNING: The PWD variable is not set. Defaulting to a blank string. goes away

#

but container still doesnt start

#

im using linux

brazen forge
#

hmm. $PWD should be set automatically by the shell

brazen forge
past hound
#

how do i know which shell im using?

#

yes same error

brazen forge
#

echo $SHELL

past hound
#

im using zsh

brazen forge
#

hmm. straaange

past hound
#

/usr/bin/zsh

brazen forge
#

can you run

echo $PWD
past hound
#

this is like the 10th time im trying to learn docker

#

and its stuff like this that meakes me want to giveup

#

ok

#

$PWD => /home/rickyjw/odinproject/test-app/server

brazen forge
#

hmm

past hound
#

yes hmm

brazen forge
#

could you try

PWD=$(pwd) sudo docker-compose up
past hound
#

k one sec

#

same error

#

i dont think its a $PWD issue

#

cause even if i replace $PWD with a . its the same error

#

some it must be something with the way im creating the volumes

#

you know what im trying to say

brazen forge
#

with the ., what exact error do you get?

past hound
#

but like i said im just following the docs

#

the error that I pasted above

#
โžœ  server PWD=$(pwd) sudo docker-compose up
[sudo] password for rickyjw: 
Removing server_caddy_1
Recreating e18c48c71aed_server_caddy_1 ... error

ERROR: for e18c48c71aed_server_caddy_1  Cannot start service caddy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/rickyjw/odinproject/test-app/server/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /home/rickyjw/odinproject/test-app/server/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for caddy  Cannot start service caddy: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/home/rickyjw/odinproject/test-app/server/Caddyfile" to rootfs at "/etc/caddy/Caddyfile": mount /home/rickyjw/odinproject/test-app/server/Caddyfile:/etc/caddy/Caddyfile (via /proc/self/fd/6), flags: 0x5000: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
tawny temple
#

What is Caddyfile?

#

Note

#

are you trying to mount a directory onto a file (or vice-versa)?

#

The mount paths must both be directories, not files.

past hound
#

they are directories

brazen forge
#

Caddyfile is a directory? pithink

#

isn't it a file?

past hound
#

I can cd into it

brazen forge
past hound
#

so doesnt that mean its a directory?

brazen forge
#

what are the contents of Caddyfile?

tawny temple
#

cd into it where?

#

On the host or in the container?

past hound
#

in my host

#

its in the same folder as my docker-compoes file

tawny temple
#

I believe the error is stating that the destination (i.e. within the container) is not a directory.

past hound
#
  • ./Caddyfile:/etc/caddy/Caddyfile
brazen forge
#

Caddyfile is supposed to be a file AFAIK

past hound
#

so how would I fix that line

brazen forge
past hound
#

like I said, im just copy/pasting frm the caddy docs

#

its empty

brazen forge
#

uhh

tawny temple
#

Sorry I misspoke. They can be files but they have to both be files. Or they have to both be directories.

#

For caddy I think it should be a file

brazen forge
#

yea

#

make Caddyfile a file

past hound
#

im so confused

#

make a caddyfile where?

brazen forge
#

could you show your directory structure as it is currently?

#
tree .
past hound
#
โžœ  server ls -l
total 44
drwxr-xr-x. 1 rickyjw rickyjw     0 Jul  6 15:31 caddy_config
drwxr-xr-x. 1 root    root        0 Jul  6 14:59 Caddyfile
-rw-r--r--. 1 rickyjw rickyjw   381 Jul  6 15:40 docker-compose.yml
-rw-r--r--. 1 rickyjw rickyjw     0 Jul  6 14:47 Dockerfile
-rw-r--r--. 1 rickyjw rickyjw    12 Jul  6 14:54 index.html
-rw-r--r--. 1 rickyjw rickyjw   268 Jul  5 17:52 index.js
drwxr-xr-x. 1 rickyjw rickyjw  1646 Jul  5 17:51 node_modules
-rw-r--r--. 1 rickyjw rickyjw   347 Jul  5 17:51 package.json
-rw-r--r--. 1 rickyjw rickyjw 27956 Jul  5 17:51 package-lock.json
drwxr-xr-x. 1 root    root        0 Jul  6 14:59 site
tawny temple
#

First, do you need or want to override the default Caddyfile? The mount is optional. So if you don't need it, don't do it. If you do need it, then for -v $PWD/Caddyfile:/etc/caddy/Caddyfile, $PWD/Caddyfile should point to a file on the host.

brazen forge
#

basically, delete the Caddyfile directory and make a file named Caddyfile

past hound
#

@tawny temple I just want to follow the official caddy docs

#

to get something working

#

im not trying to do anything advanced here

tawny temple
#

Well on Dockerhub they imply that overriding the Caddyfile is optional. But I know nothing about Caddy.

past hound
#

@brazen forge ok give me a sec

brazen forge
#

well, mounting a custom Caddyfile would be the advanced thing to do here

past hound
#

ok so something interesting happened

#

so i deleted the Caddyfile folder and created a new Caddyfile file

#

and now I get this

โžœ  server PWD=$(pwd) sudo docker-compose up
[sudo] password for rickyjw: 
Removing server_caddy_1
Recreating e18c48c71aed_server_caddy_1 ... done
Attaching to server_caddy_1
caddy_1  | {"level":"info","ts":1657137329.5013137,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
caddy_1  | run: adapting config using caddyfile: EOF
#

does that mean its working?

brazen forge
#

probably yea

#

but like Mark said, you probably don't need to mount a custom Caddyfile for basic usage

tawny temple
#

I kind of suspect it isn't working properly if you created a file without putting anything inside it

past hound
#

its not working

#

cause when i got to localhost, it gives me the page not found

#

normally it would bring up the default caddy page

tawny temple
#

Then don't overwrite the caddyfile

#

Until you know what you want to put in there

past hound
#

you told me to create a Caddyfile?

past hound
#

am i wrong?

tawny temple
#

That instruction was likely given in the context of you wanting to override the config. But as I suggested, you don't have to do it; it's an optional step.

past hound
#

i dont want to override anything

#

i jsut want to get it to work

#

if there is anyone in here that knows anything about docker please just send me a DM. thanks

tawny temple
#

We already gave you a solution.

#

Don't overwrite the config. That mount is optional

past hound
#

dude im just followingg what i was being told

#

he said to delete the directory and to create a Caddyfile

#

thats what i did

#

i dont know if it overrides some other file

#

im obviously new to all of this

tawny temple
#

That was said to you before it became evident that you didn't want to override the config. It was (perhaps mistakenly) taken for granted that you understood that it was an optional step, so they were following with that assumption and just giving you instructions on how to correctly overwrite the Caddyfile. After that was given, I put into doubt whether you actually need to overwrite it, and evidently you don't; you didn't realise it was optional. It was a miscommunication but I hope that clears it up.

past hound
#

ok so then what was the solution?

#

cause im still lost

tawny temple
#

This option creates a bind-mount which overwrites the image's Caddyfile with the file on your host -v $PWD/Caddyfile:/etc/caddy/Caddyfile. Just remove that and it will revert to using the default Caddyfile in the image.

past hound
#

so i delete the Caddyfile?

tawny temple
#

On your host, you can delete it for the sake of tidiness but it doesn't matter really. The important part is that it's not mounted i.e. that the option I just mentioned is not used.

past hound
#

yea but i really want to just follow along with the docs says to do

#


version: "3.7"

services:
  caddy:
    image: caddy:<version>
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - $PWD/Caddyfile:/etc/caddy/Caddyfile
      - $PWD/site:/srv
      - caddy_data:/data
      - caddy_config:/config

volumes:
  caddy_data:
    external: true
  caddy_config:
tawny temple
#

This is all the docs have to say on the matter in the "Basic Usage" section

#

To override the default Caddyfile, you can mount a new one at /etc/caddy/Caddyfile: ...

past hound
#

yea sure I can delete the volumes to make things work

#

but id like to understand also how to get it to work using volumes as well

tawny temple
#

That instruction is basically saying that if you have a reason to override the Caddyfile, here is how you do it. It's not saying you should unconditionally do it. In your case, you just want the basic set up so there's no reason to overwrite it. Just remove this line - $PWD/Caddyfile:/etc/caddy/Caddyfile.

#

If you did want to override it, then you basically had the mounting part figured out. The only problem was that your Caddyfile was empty. You'd have to read their instructions to know what to put inside. But as you said, you're not trying to do anything advanced so why make this harder for yourself?

past hound
#

ok let me make sure im understanding this corectly

#

i only specify that line if I plan to overwrite the original Caddyfile?

tawny temple
#

Correct

past hound
#

if not then I simply just dont include that line?

tawny temple
#

Correct

past hound
#

ok one other thing

#

i was following this tutorial

#

s

#

โค๏ธHost your applications and get ๐Ÿ’ฐ$100 credit (referral): https://m.do.co/c/1b74cb8c56f4

By watching this video you will learn how to deploy your Node.js application in minutes with Docker, docker-compose & Caddy Server with full HTTPS support.

GitHub Repository: https://github.com/TomDoesTech/caddy-nodejs-docker-tutorial

Article: https://to...

โ–ถ Play video
#

at 4:54 you can see that includes that - $PWD/Caddyfile:/etc/caddy/Caddyfile`

#

in his docker-compose file

#

is that because is overwriting the Caddyfile?

#

because late ron in the video he creates a Caddyfile

#

to do some reverse proxy stuff

tawny temple
#

Yeah, if you want to follow this tutorial you will end up overwriting the Caddyfile. So you'll want to keep that line.

#

And it also shows what to put inside the Caddyfile, so that solves the problem of having an empty one

past hound
#

ok makes sense now

#

the docs was confusing me but it was probably just my lack of knowledge

#

anyway thakns dude. i really appreciate your help

#

i dont know where the other dude went but thank you too

tawny temple
#

You're welcome

finite crest
dry vale
#

What is the best way to create a simple API with Python and publish it?

#

I already have the "base" for it

buoyant quarry
#

Can someone help me, I succesfully made a list generate a random text. But it only regenerates it when I start my script, I want it to do it every second or so. Does anyone know how I can get this?

These are some parts of my code:

random_rose = random.choice(random_rose_list)```
```    client.set_sounds({
        "rose": random_rose,```
rapid sparrow
#

Has anyone was able in vscode to point as a python venv to be inside docker container? ๐Ÿค” (docker-compose)

UPD: Nevermind; Attached. It is possible and quite good. I think better than dealing with venv ;b

velvet elk
#

I want to learn some programs

#

I can make

#

I am a basic user

thorny shell
#

!kindling

rancid schoonerBOT
#

Kindling Projects

The Kindling projects page on Ned Batchelder's website contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

wooden ibex
#

just install everything into the docker container

rapid sparrow
#

so that vscode would apply syntax recognition from installed libraries and etc

#

nevermind, it all works

woeful goblet
#

can someone pls code a youtube downloader in Py for me?

brazen forge
woeful goblet
#

okay but thx for the reply

rapid sparrow
#

hail FOSS

olive path
#

Any tips on enforcing unspoken and perhaps somewhat weird style rules? I have a project of mine I want to make sure upholds a set of guidelines I try to follow, but I am not sure I can easily find a linter which does this.

#

Essentially, I am wondering what would be the easiest way to define very custom styling rules. Is making my own linter very difficult?

thorny shell
#

I'd expect so ๐Ÿ˜

olive path
#

๐Ÿ˜” To give an example... I want to ensure that the order of __all__ is the same as the definition of the names inside of it

thorny shell
#

that, by itself, should be easy; at least for function definitions

#

each function has some attribute that tells you the file and line number.

olive path
#

Right, this will only really be for functions and classes

iron basalt
#

I'd probably look at what it would entail to write a flake8/pylint plugin - I imagine it will do most of the work for you and you just hook in your checks at some point, but it's something I've never dabbled in

rapid sparrow
#

Most of desired linting should be within the grasp of some regex

thorny shell
#

๐Ÿคฃ

finite fulcrum
#

is there some pure python line profiler?

clear sorrel
brazen forge
rancid schoonerBOT
#

Line-granularity, thread-aware deterministic and statistic pure-python profiler

pearl goblet
umbral jay
#

anyone used pycharm community ver for Django? Is it good enough? Pycharm pro version has special support for Django. Is it worth going for it, in your experience?

neon swan
#

Anyone familiar with Poetry? I've gone from poetry just working without manually activating environment's and being able to call one project from another to Poetry stropping all the time and having to delete, recreate and reinstall environments. I'd like to go back to seamless usage. Any tips?

tardy island
#

hey any recommended advanced git tutorial?

#

Like for people who have comfortably clone/pull/commit/push/merge for years and now want to learn about more messy stuff like branching, rebase etc?

brazen forge
#

by branching, do you mean branching strategies?

brazen forge
tardy island
#

Nope

#

This looks good

#

So basically I know stuff up to chapter 2

#

I'll start reading from chapter 3 i guess

#

thx

brazen forge
#

I think the more advanced stuff is in Ch. 7

rapid sparrow
thorny shell
rapid sparrow
#

I am trying to run script `python3 src/scrappy/manage.py
https://github.com/darklab8/darklab_darkbot/blob/master/src/scrappy/manage.py

But i get this error

darklab_darkbot$ python3 src/scrappy/manage.py 
Traceback (most recent call last):
  File "/home/naa/repos/pet_projects/darklab_darkbot/src/scrappy/manage.py", line 1, in <module>
    from .database import engine
ImportError: attempted relative import with no known parent package
#

how to how to resolve those importing problems? xD

#

file has code like

from .database import engine
from .players.models import Base

Base.metadata.create_all(bind=engine)

I hoped relative import will work

#

i altredy tried absolute importing too

#

how can I debug it even?

#

Well. I was able to solve it no idea how ๐Ÿค”

#
import database as database
import players.models as models

models.database.Base.metadata.create_all(bind=database.engine)
#

changing imports to this apperently solved issue

#

i wonder if i can use somehow imports starting from folder src

full bronze
#

You might be able to run it as a module with the -m flag

heavy knot
#

I constantly forget to pull after I've pushed to one of my own repos with a github action that commits changes to the repo

#

Is there a tool that maybe reminds me to pull or pulls for me

#

It makes merge commits after I forget with isnt great

thorny shell
#

not that I know of

#

you can tell git to prohibit merge commits, though, iirc

#

so you'll get an error rather than a merge commit

heavy knot
#

That could work ill look into that

thorny shell
#

put this in ~/.gitconfig

[merge]
        ff = only
#

I have written (in python!) a tool that fetches from all my repos more or less at once, and I run that a few times per day

#

nice and fast

rapid sparrow
#

when I try launching program from root level of folder src/scrappy with uvicorn main:app.py
i get error with relative import ImportError: attempted relative import with no known parent package

#

how to resolve it?

#

that's how stuff is there

#

so far as solution i was only able to launch the folder from parent one. But I wish to try launching it from the root of this scrappy folder

tawny temple
#

That does not seem appropriate

#

scrappy is a package since it has __init__.py so really it should be scrappy.main:app. And in main.py you should be doing from scrappy.players import views as player_views

#

It doesn't make sense to launch from within scrappy because it's a package

#

Also I don't think src should have __init__.py

#

And definitely not the root of your repository

#

You would have to launch with src as the cwd. But typically the intent behind using the "src" directory structure is that you plan to install your scrappy package. If you do install it, then you'd be able to run from the project root, or from anywhere really.

rapid sparrow
#

this explained everything

#

I just deleted __init__.py file from scrappy folder

#

and it started to work under different importing rules

#

which resolved everything correctly now

tawny temple
#

That is not the appropriate solution

#

scrappy should be a package

#

so it should have __init__.py

rapid sparrow
#

why? Scrappy is a microservice, it is not a package

#

it makes sense for it to be not a package

#

Scrappy is a fully fledged application

#

with its own dockerfile

#

launched as uvicorn main:app

tawny temple
#

It's a package in the sense of the Python import system not in the sense of publishing something to pypi

rapid sparrow
tawny temple
#

Well I don't quite follow your intent or directory structure

rapid sparrow
#

I mean...

tawny temple
#

It looks strange to me

rapid sparrow
#

picture in architecture folder explains

#

it shows future plan of infrastructure

#

src is having 4 different microservice parts

#

which are going to be in the project

tawny temple
#

Usually all your Python files are within a package (i.e. a folder that has an __init__.py) and everything else like dockerfile, requirements.txt, etc are outside in the project root

#

This is quite standard regardless of whether it's a library or an application

rapid sparrow
#

erm. The confusion is because, technically each folder of src should be having its own repository

#

I simplified situation and made them all in one repo

#

each src folder, would be having (potentially) its own dockerfile

#

as they are all different apps to pack

#

therefore they have their own requirements/constraints files

tawny temple
#

I'm not familiar with all the files (like what manage.py and databases.py) are for, but I would structure it like this

#
src
    scrappy
        scrappy
            alembic
            bases
            core
            forum_records
            players
            __init__.py
            main.py
        tests
            __init__.py
            conftest.py
            test_whatever.py
        .dockerignore
        alembic.ini
        dockerfile
        requirements.txt
#

If you have some python files that are more like scripts for development/deployment rather than a core part of the app then those can live in a "src/scrappy/scripts" or "src/scrappy/utils" directory

rapid sparrow
#

Hopefully now since it is not a package, I will be able to structure it

rapid sparrow
tawny temple
#

I'm not familiar with sqlalchemy so I don't know why that would happen for you

rapid sparrow
#

I think relevant test code should be in same sub package where it belongs

tawny temple
#

Yeah, that's fine. It's suggested by pytest as an alternative.

rapid sparrow
#

kind of nice that I encounter such problems. Good that I finally went to FastAPI

#

in Django i remained blissfully ignorant to such problems xD

#

everything worked out of the box

tawny temple
#

Yeah it generates a project structure for you. You could deviate from it but most stick to defaults

rapid sparrow
#

i will have better understanding of the stuff that happens not in the box now

#

i wish to make a full comparison of stuff that is better or worse in fastapi

#

and seeing things manually happening in fastapi and effort i need to make in order to make them good again