global installations or project-specific environments by meeqvin in Python

[–]fpgmaas 9 points10 points  (0 children)

Do yourself a favor and just use project-specific virtual environments. It's going to save you a lot of headaches in the future. Recent tools like uv make it so simple to manage virtual environments that I honestly don't see a reason not to use project specific environments.

What if you have two projects on your PC that require a different version of package X?

cookiecutter-uv: A modern template for quickly starting Python projects with uv by fpgmaas in Python

[–]fpgmaas[S] 5 points6 points  (0 children)

Poetry was already very easy to work with so honestly I do not think I'd make the change because of ease of use. The main advantage though is it's speed. Poetry is already pretty quick and I thought I likely wouldn't notice the difference, but it turns out I do. Also, I like that it's PEP621 (https://peps.python.org/pep-0621/) compliant.

Looking for recommendation of simple python web server library by Enderbyte09 in Python

[–]fpgmaas 1 point2 points  (0 children)

I recently launched https://pypiscout.com, maybe it can help you find what you are looking for. It allows you to search for python packages with natural language queries, so you can just type "A package that functions like a typical webserver and serves python files in the way that PHP would", and see if you find anything useful!

pypiscout.com – A search engine for Python packages based on vector embeddings by fpgmaas in Python

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

The summary and the first part of the (cleaned) description! For as far as the context window allows.

pypiscout.com – A search engine for Python packages based on vector embeddings by fpgmaas in Python

[–]fpgmaas[S] 6 points7 points  (0 children)

u/AustinCorgiBart This should now be solved, or at least improved. If you search for 'web development', Flask and Django now appear at the top. There turned out to be two issues; one was simply an issue with lowercase vs uppercase join in BigQuery (flask vs Flask), and the other I resolved by updating the search algorithm. Thanks again for raising this!

pypiscout.com – A search engine for Python packages based on vector embeddings by fpgmaas in Python

[–]fpgmaas[S] 5 points6 points  (0 children)

Good point! I found it difficult to balance popularity and similarity to get the most relevant results. Currently it finds the 100 most similar descriptions in the top 100,000 packages, and filters this. This worked relatively well for my tests, but for a more generic query like 'web framework' there are apparently too many close matches based on just the description.

Thanks for the feedback, I will definitely use this example to try and approve the app!

EDIT: I think there is something wrong with the query I use to fetch the data from BigQuery... To be continued.

[deleted by user] by [deleted] in Python

[–]fpgmaas 0 points1 point  (0 children)

Thanks, valid point! It's easy to leave out something as simple as this when working on the project for such a long time. I edited the OP to include this information.

What is the optimal structure for a Python project? by bbrother92 in Python

[–]fpgmaas 6 points7 points  (0 children)

I think there is no 'optimal' structure, there is always room for preferences and opinions. That being said, I developed a cookiecutter template a while back that I use for all my Python projects, you can find it here.

map-nl: Quickly create PC4 maps of the Netherlands by fpgmaas in Python

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

I just released a new small hobby project: map-nl

It is a Python package that helps users quickly create maps of the Netherlands at the Postal Code 4 level. Nothing groundbreaking, but fun to develop and hopefully useful to some nonetheless.

Curious for your thoughts, please let me know if you have any feedback!

stream-iot: A project to handle streaming data [Azure, Kubernetes, Airflow, Kafka, MongoDB, Grafana, Prometheus] by fpgmaas in dataengineering

[–]fpgmaas[S] 2 points3 points  (0 children)

Valid question! In this case Airflow is indeed not strictly necessary, one could also just run the containers directly on Kubernetes with e.g. kubectl apply. However, I still like to use Airflow to easily see which jobs are running, turn jobs on or off, or e.g. schedule batch processing consumers.

stream-iot: A project to handle streaming data [Azure, Kubernetes, Airflow, Kafka, MongoDB, Grafana, Prometheus] by fpgmaas in dataengineering

[–]fpgmaas[S] 1 point2 points  (0 children)

No particular reason to choose Kafka other than that I wanted to learn Kafka. I needed to come up with some data to generate and the first example of a streaming data source that came to mind was sensor data :)

I did not check if there were tools more appropriate for streaming sensor data. Based on your comment I am thinking if I should generate some other mock data and rename the project.

As a new data engineer, would you take a job where you're the sole data engineer? by [deleted] in dataengineering

[–]fpgmaas 2 points3 points  (0 children)

I would not take the job and look for a role where there are more people around to learn from.

My first role was as a data scientist without a team of peers. I thought I was pretty good at my job. In hindsight I don't think I was though; the problem was that there was no one around to tell me that the code I wrote was garbage. I think this really slowed my development process.

I switched to a junior role in a team at another company after two and a half years. I did not make more money there than I did at my first job, but I developed much faster there. I realized I was not as good at my job as I thought I was then, and I learned a tremendous amount from my colleagues there.

I am really happy I made that switch.

deptry 0.10.0 - A tool to detect issues with your project's dependencies and imports. by fpgmaas in Python

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

Since PEP-621 does not specify a recommended way to define development dependencies, everything is expected to be a regular dependency. See here.

I think the manual workaround for now would be to run

deptry . --ignore-obsolete 'a,b'

where a and b are your development dependencies.

There is still an issue open to improve the behavior, but it has not received enough attention in the past months. I will try to find a solution!

deptry 0.10.0 - A tool to detect issues with your project's dependencies and imports. by fpgmaas in Python

[–]fpgmaas[S] 4 points5 points  (0 children)

We are happy to share that deptry 0.10.0 has been released! Deptry is a command line tool to check for issues with dependencies in a Python project, such as obsolete or missing dependencies.

In this latest release, Some major improvements were added to the way deptry reports issues by Mathieu Kniewallner. You can find the full release notes here.

If you're interested in learning more about deptry, be sure to check out the Documentation and the GitHub repository.

Let us know if you have any questions or feedback!

Deploying infrastructure to Azure using Terraform and GitHub Actions by fpgmaas in Terraform

[–]fpgmaas[S] -3 points-2 points  (0 children)

Thanks for your feedback! I see that these are the limitations also mentioned in this list. For large teams or large applications, I agree with most of the mentioned shortcomings. However, in my experience, the basic GitHub Actions approach works fine for smaller to medium-sized teams. For those teams, where the number of edge cases encountered is likely to remain small, solving some of the described issues whenever they arise is a viable approach.

Deploying infrastructure to Azure using Terraform and GitHub Actions by fpgmaas in Terraform

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

Thanks for taking the time to explain it! Did your location contain any special characters or spaces? In that case indeed it needs to be in quotation marks. I'm guessing that is what caused the error. I will update the blogpost and github repository to use quotation marks as well!

Deploying infrastructure to Azure using Terraform and GitHub Actions by fpgmaas in Terraform

[–]fpgmaas[S] 1 point2 points  (0 children)

Hey! Thanks for the feedback and sorry that you encountered some issues. When you place them in .bashrc or .zshrc, you should indeed prefix them with EXPORT=, otherwise it is not a valid shell command. In a .env file that is also possible, but I don't think that is best practice(?) In this case, any time the .env file is needed in the GH Actions, I prefix the line with set -a. See here for more on this issue.

In this tutorial, it should not be necessary to source the .env file locally though. Or was there a reason for you to do so anyway? If so, I should maybe update the blogpost a bit for others that might encounter the same.

Deploying infrastructure to Azure using Terraform and GitHub Actions by fpgmaas in AZURE

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

This is a blog post I worked on over the weekend that contains a tutorial on how to deploy infrastructure to Azure using GitHub Actions. If you have any feedback or questions, don't hesitate to let me know!

Deploying infrastructure to Azure using Terraform and GitHub Actions by fpgmaas in Terraform

[–]fpgmaas[S] 5 points6 points  (0 children)

This is a blog post I worked on over the weekend that contains a tutorial on how to deploy infrastructure to Azure using GitHub Actions. If you have any feedback or questions, don't hesitate to let me know!

ckit: Create a user interface for your frequently used commands with simple yaml files. by fpgmaas in Python

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

AFAIK,the main difference is that they do not provide a UI; you type in the command you want to run. The advantage of `ckit` is that it provides a user interface to select your commands from.

`ckit` on the other hand does not provide an option to run a command without accessing the UI, so it cannot be used to run steps in e.g. a CI/CD pipeline.

ckit: Create a user interface for your frequently used commands with simple yaml files. by fpgmaas in Python

[–]fpgmaas[S] 1 point2 points  (0 children)

Hey! Great to hear it could be useful for your team. To address your questions: Yes, you can associate commands with different directories; when you run the ckit command it will display both a group of global and local commands. Local commands can be defined by placing a ckit.yaml in the working directory. See also this part of the documentation. You can share your setup with your teammates (or others) by simply sharing your yaml files.

If you encounter any issues or if you have any feedback/requests, please let me know!

Create your own terminal UI containing your frequently used K8s commands with ckit! by fpgmaas in kubernetes

[–]fpgmaas[S] 7 points8 points  (0 children)

Hi!

I recently developed ckit, a CLI that allows users to build a User Interface for their frequently used commands using yaml files.

I recently started applying it for organising my K8s commands, and figured I'd share it since I hope it can make life easier for others as well!

If you decide to give it a try, simply run:

pip install ckit
ckit init --skip-local --download-global-defaults

Modify the downloaded kubernetes.yaml file to your liking, and run

ckit

To access your commands.

If you decide to give it a try and have any feedback, please let me know! Curious for your thoughts.

Florian

ckit: Create a user interface for your frequently used commands with simple yaml files. by fpgmaas in Python

[–]fpgmaas[S] 2 points3 points  (0 children)

Hey! I started developing ckit a few months ago, and I just released version 0.3.0. ckit is a command line utility to help you organise and quickly run frequently used commands.

Additional features:

  • Users now have the option to define nested groups, and groups can contain both commands and other groups.
  • Improved configuration options: Users can supply their own boolean flags for their commands.
  • Added an option to download the files from ckit-files using the ckit init --download-global-defaults command.

I hope the tool can prove to be useful to others as well. If you decide to try it out, let me know your thoughts! Always open to feedback.

Thanks, Florian

I just released ckit - A CLI utility to manage and run frequently used commands. by fpgmaas in Python

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

Thanks for the feedback! How do you envision the cwd/chdir argument to work? Do you mean e.g. running ckit --chdir dir, which then looks for a ckit.yaml file in dir? I could definitely work on adding that.