Run Box Opener Node (Python) π
To run the box opener node without containerization, you'll need Python 3 installed on your system and some basic command line knowledge.
It's recommended to use the Docker version of the box opener because it is easier to manage and maintain. Running the standalone Python program requires more setup, and you'll need to keep the code updated by pulling the latest changes from the repository whenever a new release is available.
Prerequisitesβ
- Python 3: Ensure you have Python 3 installed. You can check by running
python --versionorpython3 --versionin your terminal. If you don't have it, you can download it from the Python website. - Git: Installed on your system. You can check by running
git --version. If you need it, you can download it from Git's official site. - Virtual Environment (Optional but recommended): A virtual environment helps isolate your projectβs dependencies. You can check if it's available by running
python -m venvorpython3 -m venv.
Stepsβ
-
Clone the Repository
Open your terminal, then clone the repository and navigate to the project directory:
git clone https://github.com/Erwin-Schrodinger-Token/ewn-box-opener
cd ewn-box-opener -
Create a Virtual Environment (Optional but recommended)
This ensures a clean Python environment:
# For systems where Python 3 uses `python3`
python3 -m venv venv
# Or just use `python` depending on your system
python -m venv venvTo activate the virtual environment:
-
Linux/macOS:
source venv/bin/activate -
Windows:
venv\Scripts\activate
-
-
Install Dependencies
With the virtual environment activated, install the required Python packages from
requirements.txt:pip install -r requirements.txtNote: If you face issues, try using
pip3instead ofpip. -
Set Up Environment Variables
Copy the
.env.examplefile to.envand add your API key.- Linux/macOS:
cp .env.example .env - Windows: Use File Explorer to copy
.env.exampleto.envor use the command:copy .env.example .env
Open the
.envfile in a text editor (e.g., Notepad, VS Code) and replaceapi_key_herewith your actual API key. - Linux/macOS:
-
Run the Python Script
Run the script using:
python run_box_opener.pyNote: Ensure you're using the correct Python command (
pythonorpython3) depending on your system. -
Logging
You should see logs in your terminal. If you receive "β Guesses rejected (429)" errors at first, it's normal, and the system should stabilize.
Additional Notes for Windows Usersβ
- Make sure Python 3 is added to your PATH during installation. You can download Python from the official Python website.
- Some commands may require
pythoninstead ofpython3andpipinstead ofpip3.