I'm currently building a Python library with Rust, and you can too! It's simple with PyO3 Maturin Maturin handles the entire packaging workflow with minimal config. Maturin builds and publishes crates with PyO3, CFFI, and uniffi bindings as Python packages. It supports Windows, Linux, macOS, and FreeBSD. Works with CPython, PyPy, and GraalPy. 𝟰 𝗺𝗮𝗶𝗻 𝗰𝗼𝗺𝗺𝗮𝗻𝗱𝘀 👉🏽 maturin new - Creates a cargo project configured for Python 👉🏽 maturin build - Builds wheels and stores them locally 👉🏽 maturin publish - Builds and uploads to PyPI 👉🏽 maturin develop - Installs directly into your virtualenv for fast iteration 𝗠𝗶𝘅𝗲𝗱 𝗥𝘂𝘀𝘁/𝗣𝘆𝘁𝗵𝗼𝗻 𝗽𝗿𝗼𝗷𝗲𝗰𝘁𝘀 You can structure projects with both Rust and Python source files. Maturin adds the native extension as a module in your Python package. The tool handles all the glue code automatically. 𝗣𝘆𝘁𝗵𝗼𝗻 𝗺𝗲𝘁𝗮𝗱𝗮𝘁𝗮 Maturin supports PEP 621. Define dependencies, console scripts, and classifiers in pyproject.toml. It merges metadata from both Cargo.toml and pyproject.toml. 𝗠𝗮𝗻𝘆𝗹𝗶𝗻𝘂𝘅 𝗰𝗼𝗺𝗽𝗹𝗶𝗮𝗻𝗰𝗲 The project includes auditwheel reimplementation that checks library compatibility. For full manylinux compliance, build in the official docker containers. Maturin assigns proper platform tags automatically. 𝗦𝗼𝘂𝗿𝗰𝗲 𝗱𝗶𝘀𝘁𝗿𝗶𝗯𝘂𝘁𝗶𝗼𝗻𝘀: Add a build-system entry to pyproject.toml and maturin can build sdists with --sdist. The source distribution contains the same files as cargo package. If you're writing Python extensions in Rust, maturin removes the packaging headaches. Just write code. #rust #python #opensource #ai
Building Python library with Rust using Maturin
More Relevant Posts
-
After dealing with a messy Python setup, I have decided to write this blog A quick guide on when (and how) to uninstall all Python packages safely across Windows, macOS and Linux Read it here 👉 https://lnkd.in/dy7DJQuQ How do you keep your Python setup clean - venv, Conda, pyenv, or something else? #Python #Developers #Programming #pyenv
To view or add a comment, sign in
-
Claude is outputting commands that would break our operating systems! To give context for the unaware, python is installed by default as a system dependency by many of the most popular operating systems (macOS, almost every single linux distro) I was tinkering with an open source project and I asked Claude for recommendations on VAD (voice activity detection) models. It gave good library recommendations like I expected, but I noticed the command it gave me to install the libraries `pip install ... --break-system-packages` I actually did not know what that flag did, so I looked it up. Apparently, newer versions of pip checks if you are installing a package outside of a virtual environment and prevents you from installing in case you are. The `--break-system-packages` flag disables this check. This means that if you are installing a package that, for an example, modifies an existing system package's version, you have a very high risk of breaking the critical operating system functionalities. What bothers me is that Claude not only did not recommend me to create a virtual environment first, it just went ahead and gave me the command that would silence the error that would prevent me from doing something very dangerous! This is why we MUST check our copy pasted code before executing it, always. Never get lazy. I'll provide links from the official docs to explain the usage and the context behind this flag in the comments.
To view or add a comment, sign in
-
-
⏰ Automate Your Workflow: Scheduling Jobs with Python and Cron/Task Scheduler 🐍 💡 Ever wished your Python scripts could run automatically—daily, weekly, or even hourly—without manual effort? With Cron (Linux/macOS) and Task Scheduler (Windows), you can schedule your Python jobs to execute seamlessly in the background. 🚀 Whether it’s automating data backups, report generation, or routine maintenance, scheduling Python tasks ensures efficiency and consistency—so you can focus on what truly matters: insights and innovation. 🔗 Join our Community for more interesting updates: ➡ https://lnkd.in/gBpWuxhy ⬅ #Python #Automation #Cron #TaskScheduler #DataEngineering #Productivity #TechTips #NuPieAnalytics
To view or add a comment, sign in
-
func-validator v1.3.0 feature highlight: Custom Error Message Validator classes provided by the func-validator Python package can accept custom error messages via the err_msg argument, which will be shown if an invalid argument value is provided. Custom error messages also let you interpolate argument names and values into the message. This can be done via the following syntax: “${arg_name}, ${arg_value}” Check the attached image below to see how to use custom error messages. You can install func-validator using the following command: pip install func-validator or pip3 install func-validator on Unix (or Linux) systems. Stay up to date with the latest “func-validator” features, tips, and updates—follow me now so you never miss an announcement! Links PyPI: https://lnkd.in/ez9h2QZy GitHub: https://lnkd.in/esHVSSt8 Docs: https://lnkd.in/eG_DTegq #Python #OpenSource #DevTools #CodeQuality #Programming #GitHub #MATLAB
To view or add a comment, sign in
-
-
#zabbix_sender In this section, we’ll discuss Zabbix Sender and how to use it in practice. First, we’ll write a Python script that collects some data from the operating system — for example, CPU usage or memory utilization. Then, we’ll send this data to the Zabbix server using the zabbix_sender command. After successfully sending the data, we’ll create a graph in Zabbix to visualize the collected metrics and configure a trigger to generate alerts when certain thresholds are exceeded. #monitoring #zabbix #Linux #devops #python #docker #network See the full video on Aparat or YouTube: YouTube: https://lnkd.in/d8KnyUz7 aparat: https://lnkd.in/dXZcMnMa
To view or add a comment, sign in
-
🚀 #PythonJourney | Day 76 – Python + Linux in Action Day 76 of my Python journey, and today I went hands-on with Python inside Linux — coding directly in the terminal using Neovim. 🐍🐧 This setup is simple, fast, and perfect for staying focused on logic and clean code. Writing Python scripts directly in the terminal brings full control over the environment and reinforces the connection between Linux and automation. 🎯 Today’s Focus: Working with Python scripts in the Ubuntu terminal Key takeaways from today: ✅ Developing in Linux helps you understand what happens under the hood ✅ Neovim provides a minimal, distraction-free coding experience ✅ The combination of Python + terminal is ideal for automation and scripting ✅ Saving data in JSON or text files is a practical way to persist information 💡 Why it matters: Building tools directly from the Linux terminal trains discipline, precision, and focus — skills every backend developer needs. 🧠 Screenshot: my Ubuntu terminal running Neovim while coding today’s exercise. #Python #Linux #Neovim #Automation #DevJourney #BackendDevelopment #LearningByDoing
To view or add a comment, sign in
-
-
Ever wished your Linux terminal could do exactly what you want? Well, it can — with a little help from Python. 🐍💻 I just published a new blog where I show how to turn a simple Python script into a fully functional Linux command — one that works just like ls or grep. No heavy dependencies. No complex setup. Just pure Python + Linux power. ⚙️ If you love coding, automation, or just enjoy bending your terminal to your will — this one’s for you. 👉 Read it here: [https://lnkd.in/gPN-DbFi] #Python #Linux #Automation #Coding #Developers #Productivity #CommandLine #TechCommunity #Trading #AlgoTrading #Quant #DataScience #DevOps #Developers #CommandLine #Coding #WorkflowAutomation #OpenSource #TechInnovation
To view or add a comment, sign in
-
What’s New for Python on App Service for Linux: pyproject.toml, uv, and more. Python apps on Azure App Service for Linux just got a lot easier to build and ship! We’ve modernized the build pipeline to support new deployment options —whether you’re on classic setup.py, fully on pyproject.toml with Poetry or uv, or somewhere in between. This post walks through five upgrades that reduce friction end-to-end—from local dev to GitHub Actions to the App Service build environment: pyproject.toml + uv (and poetry): modern, reproducible Python builds setup.py support .bashrc quality-of-life improvements in the App Service container shell GitHub Actions samples for common Python flows (setup.py, uv.lock, local venv, and pyproject.toml deployments) pyproject.toml + uv uv is an extremely fast Python package & project manager written in Rust—think “pip + virtualenv + pip-tools,” but much faster and with first-class project workflows.... #techcommunity #azure #microsoft https://lnkd.in/gJaAdxzg
To view or add a comment, sign in
-
Just posted python based reflective loaders for Windows systems. This could be useful in a scenario where you can exploit a vulnerability like command injection on a windows system and the system has python installed. It can help you avoid writing to disk, avoid PowerShell logs, and potentially bypass application whitelisting and AMSI. One is set up to reflectively load an exe using a loader and a sender. This is so you can separate and control access to the web server hosting the loader and the server hosting the payload, then host your C2 on a third separate system, all on different IPs and subnets. There are also a loader and sender for shellcode that works with msfvenom generated shellcode if you don't want to do an exe. Or a simple shellcode runner if you don't care about writing to disk. https://lnkd.in/ev46_2Ks
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Maturin: https://github.com/PyO3/maturin PyO3: https://github.com/PyO3/pyo3