Help Topics

What is Asset Tracker© Roster definition Attribute properties Attribute types System rosters Roster mirrors Handling Files Access permissions Creating/Removing a roster Changing a roster Creating a new application Asset Tracker© requirements

What is Asset Tracker©

Asset Tracker© is a tool for creating and maintaining persistent data using Python. This tool can be used for web sites where

The data persists across sessions in a SQLite database. Asset Tracker© also provides lists and forms to display and manipulate the data. Applications can use these built-in, high-level views or create custom views using low-level database access functions.


Roster definition

Asset Tracker© can track different types of data organized in separate rosters. Each roster consists of two parts, the actual data and the meta-data, each stored separately.

Attribute properties

Each attribute has the following properties (captured in the AT_meta roster):


Attribute types

Asset Tracker provides the following attribute types:


System rosters

The following rosters are part of Asset Tracker© and must be present:


Roster mirrors

System rosters and application level rosters can be stored to or read from text files (mirrors). These text files are in Excel csv format, containing one instance per line, with values separated by tabs. All mirrors are located in the Data folder. Mirrors are called rst.txt for a roster called rst.


Handling Files

Files can NOT be stored directly in rosters, because at the very least the file name and the content are needed. So Asset Tracker stores all files (attributes of type 'file') along with their meta information (file name, etc.) in AT_file.

Rosters containing file-type attributes store ids of the corresponding AT_file instances.


Access permissions

The AT_table and AT_form modules are called with a CRUD parameter, which is a string with up to 4 unique characters. This section describes the use of this parameter.


Creating/Removing a roster

To create a new roster follow the steps below: (also refer to AT_util.init_app())

  1. Create the meta-data (copy and adjust an existing one in Data)
  2. Add the new instance to 'AT_rosters'. This will create the roster table, and import any data.

To remove a roster, delete it in 'AT_rosters' - this will delete all instances and entries in AT_meta and AT_file.

If configuration changes affect the name or the type of any attribute, then the roster must be emptied (delete its instances), while changes to other attributes don't require deleting existing instances.


Changing a roster

Steps for making changes to the structure of an existing roster (without files):

  1. Export any data
  2. Delete the roster from AT_rosters (this will remove roster's meta data from AT_meta)
  3. Make changes to roster's meta data
  4. Make changes to roster's mirror data (located in the Data folder)
  5. Add the roster to AT_rosters (this will add roster's meta data to AT_meta)
  6. Import data

To start over, delete the database file and then run 'AT_util.init_assetTracker().


Creating a new application

To create a new Asset Tracker© application follow the steps below:

  1. Copy the Asset Tracker folder to the new location (AT)
  2. For each new roster create a meta file in Data. Use sample_meta.txt as example
  3. Optionally, for each new roster create a data file in Data. Use sample.txt as example
  4. Method 1: Make changes using the config utility:
    • Open home.html in the new location
    • In AT_config change App name and site URLs
    • Add/delete lines in AT_rosters, AT_picks and AT_users
    • Export all rosters
  5. Method 2: Adjust mirrors in Data:
    • In Data/AT_config.txt change App name and site URLs
    • Add the new rosters in AT_rosters.txt
    • Add/delete AT_picks.txt and AT_users.txt
    • Call home.html, go to config:
    • Run Initialize AssetTracker and Initialize App
    • Delete the roster 'sample'
  6. Change home.html, home.py and AT_custom.py as needed

Asset Tracker© requirements

The items below are required in the home directory of the application using AT:

  1. A folder called 'Data' that contains the definitions and the data files for all rosters.
  2. A file called 'AT_custom.py', which contains instruction for creating, deleting, and updating items.
  3. A file called 'home.html' that is the default landing page of the application
  4. A file called 'index.html' that uses the AT authentication
  5. The directory call 'lib' that contains the Asset Tracker files
  6. The Asset Tracker database 'AssetTracker.db' that resides in lib

Please contact us with questions or suggestions.