Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Pylon is the Python backend version of Electron and Tauri, designed to simplify desktop application development. This open-source project, built on QtWebEngine and PySide6, provides seamless integration with various Python features, making it easy to build powerful applications effortlessly.
With pylon-app, you can leverage the full power of Python in your desktop applications. Its simplicity and flexibility make it the perfect choice for both beginners and experienced developers looking for a Python-focused alternative to Electron or Tauri. It is especially optimized for building AI-powered desktop applications.
https://github.com/python-pylon/pylon-app_html_boilerplate
https://github.com/python-pylon/pylon-app_react_boilerplate
pip install pylon-app
Package URL: https://pypi.org/project/pylon-app/
from pylon import PylonApp
app = PylonApp(single_instance=True)
# set icon
if (is_production()):
app.set_icon(os.path.join(get_production_path(), "icons/icon.png"))
else:
app.set_icon("src-pylon/icons/icon.png")
# create window
window = app.create_window(
title="Pylon Browser1",
js_apis=[CustomAPI()],
dev_tools=True
)
window.set_size(800, 600)
# load html
if (is_production()):
window.set_dev_tools(False)
window.load_file(os.path.join(get_production_path(), "src/index.html"))
else:
window.load_file("src/index.html")
# show window
window.show_and_focus()
app.run()
from pylon import TrayEvent
def on_double_click():
print("Tray icon was double-clicked.")
app.set_tray_actions({
TrayEvent.DoubleClick: on_double_click,
})
app.set_tray_menu_items([
{"label": "Show Window", "callback": app.show_main_window},
{"label": "Quit", "callback": app.quit},
])
app.setup_tray()
// CustomAPI method usage example
document.addEventListener('pylonReady', function () {
// Using the echo method
pylon.CustomAPI.echo('Hello', 42).then((result) => {
console.log(result); // "Message received in Python: Hello, 42" output
});
// Using the getAppVersion method
pylon.CustomAPI.getAppVersion().then((version) => {
console.log('App version:', version); // "App version: 1.0.0" output
});
// Example using async/await syntax
async function useCustomAPI() {
const echoResult = await pylon.CustomAPI.echo('Test', 100);
console.log(echoResult);
const appVersion = await pylon.CustomAPI.getAppVersion();
console.log('Current app version:', appVersion);
}
useCustomAPI();
// Button click event binding
document.getElementById('myButton').addEventListener('click', function () {
// Using the create_window method
pylon.CustomAPI.create_window().then((windowId) => {
console.log('New window ID:', windowId); // "New window ID: [generated window ID]" output
});
});
});
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App.jsx';
import './index.css';
document.addEventListener('pylonReady', function () {
createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>
);
});
function App() {
console.log('Pylon is ready');
window.pylon.CustomAPI.getAppVersion().then((version) => {
console.log('App version:', version); // "App version: 1.0.0"
});
return <h1>Hello World</h1>;
}
This project is licensed under the terms of the Apache License 2.0. See the LICENSE file for details.
This project uses PySide6, which is licensed under the LGPL (Lesser General Public License).
(Add information about how to contribute here)
FAQs
Unknown package
We found that pylon-app demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.