Skip to main content

A package for common GNS functions

Project description

gns_helper

gns_helper is a Python package offering a suite of utilities for streamlined GNS-related operations. This package includes tools for database operations, barcode management, ZPL label design, WiFi configuration, and user authentication.

Features

  • Database Operations: Streamlined handling of database queries and validations.
  • Label Design: Generate ZPL labels with QR codes and barcodes.
  • Barcode Management: Compare and validate barcode data with ease.
  • WiFi Configuration: Automate WiFi setup programmatically.
  • User Authentication: Includes JWT-based authentication for secure user management.

Installation

Install the package directly from PyPI:

pip install gns_helper

How to Use

  1. Interacting with API Routes This package includes utilities for interacting with APIs exposed via Flask. Here's how to make requests to various routes:

Authentication API Authenticate a user and retrieve a JWT token:

from gns_helper.app_routes import AppRoutes

base_url = "http://your-api-server.com"
auth_data = {
    "username": "your_username",
    "password": "your_password"
}
token = AppRoutes.authenticate_user(base_url, auth_data)
print("JWT Token:", token)

Get Barcode Data Fetch barcode details from the server:

headers = {"Authorization": f"Bearer {token}"}
barcode_data = AppRoutes.get_barcode_data(base_url, headers)
print(barcode_data)

Submit Label Data Send label data to the API for processing:

label_data = {
    "label_id": "12345",
    "content": "Sample Content"
}
response = AppRoutes.submit_label_data(base_url, label_data, headers)
print(response)
  1. Database Operations
from gns_helper.table_operations import DBTableOperations

db_ops = DBTableOperations()
result = db_ops.fetch("SELECT * FROM your_table_name;")
print(result)
  1. WiFi Configuration
from gns_helper.wifi_functions import configure_wifi

configure_wifi("YourSSID", "YourPassword")
  1. Barcode Validation
from gns_helper.table_operations import BarcodeDataModel

barcode_model = BarcodeDataModel()
is_valid = barcode_model.compare("123456789")
print(is_valid)
  1. Label Design
from gns_helper.zpl_label_designer import ZPLLabelDesigner

designer = ZPLLabelDesigner()
label = designer.create_label(data)
print(label)

License

This package is proprietary software and is distributed under the terms of the Proprietary License. Unauthorized redistribution or modification is prohibited. See the LICENSE file for more information.

Support

For inquiries or support contact: Neudeep Technologies Pvt Ltd

📧 neudeep.tech.pvt.ltd@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gns_helper-0.3.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

gns_helper-0.3-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file gns_helper-0.3.tar.gz.

File metadata

  • Download URL: gns_helper-0.3.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for gns_helper-0.3.tar.gz
Algorithm Hash digest
SHA256 6f39f575cba56080210fe9a552bbbf819eff64aaa8780c608f24aaa70fe053ee
MD5 c099b6716f558f1c98b6d0146e7c44f3
BLAKE2b-256 8e8199782a52203348d8e68525daa9ad7dfba1400b1bb97f9fc6f61a3d9a7646

See more details on using hashes here.

File details

Details for the file gns_helper-0.3-py3-none-any.whl.

File metadata

  • Download URL: gns_helper-0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for gns_helper-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 88914b932dd90e167b6197c445819fdcc17ef74affe2108c3d1b757f8583ea72
MD5 a42ff7a6cb94c83ef90663cbd9aa062e
BLAKE2b-256 393ad75f1a7c5bd488386fcc352a2fc892627c3e54769724861b7b65b37e1283

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page