PyBridge is an application that generates code files and Jupyter Notebooks with ease and efficiency. Jupyter Notebooks are a popular tool for data scientists and programmers to write and share code, as well as to document their work. PyBridge makes it easier to create these files by automating the process and providing a user-friendly interface. With PyBridge, you can generate code files and Jupyter Notebooks quickly and efficiently, without having to worry about the details of the process.
With PyBridge it is possible to create scripts that will run on:
- Linux;
- macOS;
- Windows;
PyBridge is a program entirely developed in Python. To run the program, open the __main__.py
file located at the root of this project.
Note:
PyBridge was born from Python 3.9. For this reason, the same version of Python (version 3.9) or higher is recommended to run the system.
PyBridge has a standard error handling library that can run in any environment. Every method implemented within the library can be called from any part of the code. That way, it is not necessary to implement the raise RuntimeError()
exception call inside the program's runtime library. Just import the module and reference the function call according to the treatment that must be executed.
Note: Read more about the
exceptions
module in PyBridge Modules below.
The following modules are part of PyBridge:
-
exceptions: The module contains one file with the purpose of raising errors generated by the program.
- exception: This library contains events that are raised when the program execution needs to be interrupted.
-
linux: The module contains one library organized to run the program in a Linux environment
- linux.py: Codes implemented in this library will be executed before the Main Script.
-
mac: The module contains one library organized to run the program on macOS
- mac.py: Codes implemented in this library will be executed before the Main Script.
-
windows: The module contains one library organized to run the program on Windows
- windows.py: Codes implemented in this library will be executed before the Main Script.
-
system: The module contains four files with the purpose provide a range of essential functionalities for your software.
-
core.py: The library defines some functions that are responsible for creating, managing, and backing up projects.
-
downloads: This library allows the user to download sample codes from PyBridge.
-
menus: This library defines functions for creating and displaying command-line interface (CLI) menus for PyBridge.
-
requirements: This library contains events that are raised when the program execution needs to be interrupted.
-
You can clone this repo to your local machine using:
git clone https://github.com/hbisneto/PyBridge.git
-
Don't forget to upgrade pip:
pip install --upgrade pip
- Install FileSystem Pro:
pip install filesystempro
- Install Requests:
pip install requests
Below, a list of the main features of the program
Efficiency
PyBridge can quickly create large amounts of code, saving time and effort.
Consistency
PyBridge generates consistent code, following the same conventions and standards throughout the project.
Ease of maintenance
If business logic or requirements change, you only need to update the PyBridge and regenerate the code, rather than manually changing multiple parts of the code.
Learning
For beginners, PyBridge can serve as a learning tool to understand how a certain code is structured.
Exceptions
PyBridge has a standard error handling library that can run in any environment. Every method implemented within the library can be called from any part of the code. That way, it is not necessary to implement the raise RuntimeError() exception call inside the program's runtime library. Just import the module and reference the function call according to the treatment that must be executed.
Note: Read more about the
exceptions
module in PyBridge Modules below.
Backup
PyBridge not only helps you create projects, but also cares about their security. It has a backup feature that allows you to compress your projects into a .zip file or simply save the projects in the “Backup” folder.
Whenever you want to back up your project, PyBridge will present a menu with two options:
- Backup Only
- Backup as compressed file (.zip)
Both options store the backup files in the "Backup" folder, which is located in the same directory where PyBridge is being run.
This feature provides an extra layer of security for your projects, allowing you to always have a safe copy of your work. With PyBridge, you can focus on creating, knowing that your projects are safe.
Sample Codes
PyBridge also offers the possibility to download example codes. These are projects generated by PyBridge itself and serve to demonstrate its features.
You have the option to download four different example projects. Each of these projects demonstrates a different type of project that you can create with PyBridge:
- GetInfo: Get the filename, creation date and modification date of a file anywhere, on any platform.
GetInfo: PyBridge Sample Application
- JoKenPo: Famous game known as "Rock, Paper and Scissors.
JoKenPo: PyBridge Sample Application
- MyTimeline: Get your Twitter home timeline.
MyTimeline: PyBridge Sample Application
- MyTimeline: Get your Twitter home timeline.
MyTimeline: PyBridge Sample Application
These example codes can be very useful to better understand how PyBridge works and to inspire your own projects. Take advantage of this feature to explore even more possibilities with PyBridge!
One of the main features of PyBridge is its user-friendly command line interface (CLI). The CLI is designed to assist you in making quick decisions when creating your code.
Upon starting PyBridge, you will be presented with a numeric choice menu. Each number corresponds to a different type of project that you can create.
Here are the options:
- New project
- Project List
- Backup Projects
- Sample Projects
- Quit
More efficiency, less bugs
The following libraries were used to implement the tool:
codecs
The module defines functions for encoding and decoding with any codec.
Learn more at: codecs — Codec registry and base classes
datetime
The datetime module provides the classes for handling dates and times.
Learn more at: datetime — Basic date and time types
os
This module provides a simple way to use functionality that is OS dependent.
Learn more at: os — Miscellaneous operating system interfaces
pathlib
This module offers classes representing filesystem paths with semantics appropriate for different operating systems. Path classes are divided between pure paths, which provide purely computational operations without I/O, and concrete paths, which inherit from pure paths but also provide I/O operations.
Learn more at: pathlib — Object-oriented filesystem paths
shutil
The shutil module provides several high-level operations on files and file collections. In particular, functions are provided that support copying and removing files. For operations on individual files, see also the os
module.
Learn more at: shutil — High-level file operations
subprocess
The subprocess module allows you to spawn new processes, connect to their input/output/error pipes, and obtain their return codes.
Learn more at: subprocess — Subprocess management
sys
This module provides access to some variables used or maintained by the interpreter and functions that interact strongly with the interpreter.
Learn more at: sys — System-specific parameters and functions
time
This module provides various time-related functions. For related functionality, see also the datetime and calendar modules.
Learn more at: time — Time access and conversions
zipfile
The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this module will require an understanding of the format, as defined in PKZIP Application Note.
Learn more at: zipfile — Work with ZIP archives
The following libraries were used to implement the tool:
requests
Requests is an elegant and simple HTTP library for Python, built for human beings.
pip install requests
The use of the requests library is mandatory in cases of "Download Sample Projects" on PyBridge.
Learn more at: Requests: HTTP for Humans™
tweepy
An easy-to-use library for accessing the Twitter API.
pip install tweepy
Learn more at: tweepy — An easy-to-use Python library for accessing the Twitter API
filesystempro
FileSystem is designed to identify the operating system (OS) on which it’s running and define the paths to various user directories based on the OS.
pip install filesystempro
Learn more at: FileSystem Pro
For more information about update logs, access RELEASES page on this repository.
- If you found any error and can send the correction, I'll thank you immensely!
- If you have any ideas, send them to me.
- If you have any questions about something, ask.
- Contribute!
Copyright © 2021–2023 Heitor Bisneto. All rights reserved.