Skip to main content

A Python library for reading data from NIPS 360 FFS data files

Project description

PyNIPS

PyNIPS is a Python library for reading data from NIPS 360 FFS data files.

The National Military Command System Information Processing System 360 Formatted File System (NIPS 360 FFS) was a database management system used by the United States of America Military, primarily during the Vietnam War. NIPS 360 FFS runs on the IBM System/360 mainframe computers and is based on the IBM Formatted File System (FFS).

Installation

pip install pynips

See also the Getting and Installing PyNIPS in the online documentation.

Usage

See also the online documentation.

As Python library

import nips


# load the NIPS file
data_set = nips.DataSet('HES.HAMLA.67.NIPS')

for record in data_set.fixed_set:
	print(record)
	
for record in data_set.periodic_sets[0]:
	print(record)

The NIPSEXT command-line utility

A stand-alone command-line utility is provided for:

$ nipsext -h

usage: nipsext [-h] [-d] [-v] {info,rec,logical,sqlite,repl} ...

NIPS EXtraction Tool

options:
  -h, --help            show this help message and exit
  -d, --debug           Print debugging statements
  -v, --verbose         Print verbose information

commands:
  {info,rec,logical,sqlite,repl}
    info                Output information about the NIPS file.
    rec                 Output records in the recfiles file format. This is a format usable by the GNU Recutils tools.
    logical             Read and display logical records in a NIPS data file. Useful for debugging physical format.
    sqlite              Export records from NIPS file to an SQLite database.
    repl                Load the NIPS file and start an interactive REPL.

Danger's over, Banana Breakfast is saved.

Development

Building Documentation

Documentation for PyNIPS is built using Sphinx.

Install Sphinx (pip install sphinx) and run:

make -C docs/ html

to build a HTML rendering of the documentation in docs/_build_html.

Publishing to PyPi

Make sure version is set propertly in pyproject.toml and nips/__init__.py.

pip install build twine

# Build the package
python -m build

# Upload using twine
twine upload dist/*

TODOs

  • Handle continuation records
  • Handle GeoCoordinate data mode

Acknowledgments

This software was initially developed as part of the SNSF-Ambizione funded research project "Computing the Social. Psychographics and Social Physics in the Digital Age".

License

AGPL-3.0-or-later

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

pynips-0.2.1.tar.gz (37.4 kB view hashes)

Uploaded Source

Built Distribution

pynips-0.2.1-py3-none-any.whl (43.9 kB view hashes)

Uploaded Python 3

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