Skip to main content

GIS Custom Modules package

Project description

PyPI Version Supported Python Versions Documentation Status License: MIT Project Status: Beta

[![PyPI Downloads](https://static.pepy.tech/personalized-badge/ntsm?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/ntsm)

The NTSM package serves as a central hub for GIS teams, providing a consistent and secure method for managing sensitive credentials across various platforms. Its primary objective is to eliminate hardcoded secrets and unify the connectivity patterns for frequently used APIs like ArcGIS Online or MSAL.

Disclaimer & Attribution

This project is an evolved library that incorporates various third-party code snippets and open-source logic. While primary development and architecture are steered by the author(s), many components have been refined, optimized, and adjusted using different AI agents to meet specific production requirements.

Key Features

  • Vault Security: AES-256-GCM encryption with PBKDF2-HMAC-SHA512 key derivation.

  • Standardized Connections: Unified interface for ArcGIS, MSAL and more.

  • Productivity Utilities: Standardized logging, file handling, archiving, and more.

Installation

Install the latest version from PyPI:

pip install ntsm

Quick Start

from ntsm.conn import vault
# Initialize vault via environment variable
v = vault(key_env="GIS_KEY")

from ntsm.lib import setup_logging
logger = setup_logging("my_app", "./logs")
logger.info("Application started")

Module Examples

Secure Vault (aeadencrypt)

Modern encryption for sensitive data.

from ntsm.aeadencrypt import VaultCipher
v = VaultCipher(key_name="MY_KEY")
encrypted = v.encrypt("secret message")
decrypted = v.decrypt(encrypted)

# Legacy AES-128-CBC
from ntsm.aeadencrypt import VaultUtils
enc = VaultUtils.encrypt_text("hello", "secret")

Connections (conn)

Easy access to common services.

from ntsm.conn import agol, msal

# ArcGIS Online
gis = agol(url="https://nt.maps.arcgis.com", user="u", password="p")

# MSAL Email
mail = msal(tenant_id="...", client_id="...", client_email="...", client_secret="...")

Library Utilities (lib)

A wide range of helper functions and classes.

from ntsm.lib import Files, Archive, FormatTime

# File & Folder management
Files.copy_dir("src", "dst")
Archive.make_zip("data")

# Time helpers
from datetime import datetime
t_str = FormatTime.to_str(datetime.now())

Package Structure

  • ntsm.aeadencrypt: VaultCipher (AES-256-GCM), VaultUtils (Legacy support).

  • ntsm.conn: vault, agol, token, msal, and more.

  • ntsm.lib: Email, Files, Archive, setup_logging, timer_wrap, and more.

Full Documentation

Access documentation locally or online:

# Open the interactive documentation viewer
ntsmdocs

Online documentation is hosted at Read the Docs.

Contact & Support

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

ntsm-0.1.8.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntsm-0.1.8-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file ntsm-0.1.8.tar.gz.

File metadata

  • Download URL: ntsm-0.1.8.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for ntsm-0.1.8.tar.gz
Algorithm Hash digest
SHA256 889396c44b72ac8dd1b8946fde4b2d5d6e535340cf4674245e6c9310f7940efc
MD5 c4d026bbf881b2ea5767ee8ee3ce4478
BLAKE2b-256 0d4486edd5142aa77f30434a7f7eaa60705b65892aa350e0fdca02b46a5a1b0d

See more details on using hashes here.

File details

Details for the file ntsm-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: ntsm-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for ntsm-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 212b3d2de15b0d71cf666cc976fca6b0569ae3282ca6fa2e2e824b7809225ad4
MD5 45b5eb62036fae7ca569f580b9d758b2
BLAKE2b-256 99a8f3ccdaa8a70d7e257b2e7eb1bbbbfc291d937cb1f6da65deaca2c3b357e1

See more details on using hashes here.

Supported by

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