A Streamlit application for generating gate passes based on hardware data from a Snipe-IT API.
- Connect to a Snipe-IT instance using an API key and URL.
- Search for hardware using Asset Tag or Serial Number.
- Generate a PDF gate pass for the selected hardware.
- Clone the repository:
git clone https://github.com/cha7uraAE/snipe-it-gate-pass-system.git
cd snipe-it-gate-pass-system
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the required packages:
pip install -r requirements.txt
- Run the Streamlit application:
streamlit run app/app.py
- Open your web browser and go to http://localhost:8501.
- Clone the repository:
git clone https://github.com/cha7uraAE/snipe-it-gate-pass-system.git
cd snipe-it-gate-pass-system
- Build the Docker image:
docker build -t snipe-it-gate-pass-system .
- Run the Docker container:
docker run -p 8501:8501 snipe-it-gate-pass-system
- Open your web browser and go to http://localhost:8501.
-
In the sidebar, enter your Snipe-IT API key and URL, then click "Connect".
-
Use the main interface to search for hardware, select a company, and generate a gate pass PDF.
.
├── app/
│ ├── pdf_generator.py # Module to generate PDF gate passes
│ ├── snipe_it_data_generation.py # Module to fetch hardware data from Snipe-IT API
│ ├── helper.py # Helper functions
│ ├── app.py # Main Streamlit app
├── .dockerignore
├── .gitignore
├── docker-compose.yml
├── Dockerfile
├── requirements.txt # Python package requirements
└── README.md # This README file
- API Key: Your Snipe-IT API key.
- API URL: The URL of your Snipe-IT instance (e.g., develop.snipeitapp.com).
- Enter your API key and URL in the sidebar and click "Connect".
- Enter an asset tag or serial number to search for hardware.
- Select a company from the dropdown menu.
- Click "Search" to display the search results.
- Click "Generate Gate Pass PDF" to create and download the gate pass.
The application handles various types of errors, such as invalid API keys, incorrect URLs, and connection issues. Appropriate error messages are displayed to guide the user.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please submit a pull request or open an issue to discuss your ideas.
- Streamlit for providing an easy-to-use framework for creating web applications.
- Snipe-IT for their powerful asset management tool and API.