Skip to main content

Synapse reporting.

Project description

Synapse Reporting

Utilities for reporting on Synapse.

Dependencies

  • Python3.7
  • A Synapse account with a username/password. Authentication through a 3rd party (.e.g., Google) will not work, you must have a Synapse user/pass for the API to authenticate.

Install

pip install syn-reports

Configuration

Your Synapse credential can be provided on the command line (--username, --password) or via environment variables.

SYNAPSE_USERNAME=your-synapse-username
SYNAPSE_PASSWORD=your-synapse-password

Usage

usage: syn-reports [-h]
                   {entity-permissions,user-project-access,user-teams,team-members}
                   ...

Synapse Reports

optional arguments:
  -h, --help            show this help message and exit

Commands:
  {entity-permissions,user-project-access,user-teams,team-members}
    entity-permissions  Report the permissions of each user and team on a
                        Synapse entity.
    user-project-access Report the projects a user has access to. NOTE: Only
                        public projects or projects the user executing this
                        script has access to will be reported.
    user-teams          Report the teams a user is a member of.
    team-members        Report the members on a team.

entity-permissions

usage: syn-reports entity-permissions [-h] [-u USERNAME] [-p PASSWORD]
                                      [-o OUT_PATH] [-r]
                                      entities [entities ...]

positional arguments:
  entities              The IDs and/or names of the entities to report on.

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Synapse username.
  -p PASSWORD, --password PASSWORD
                        Synapse password.
  -o OUT_PATH, --out-path OUT_PATH
                        Path to export the report to. Specify a path that ends
                        in ".csv" to export to a specific file otherwise a
                        timestamped filename will be created in the out-path.
  -r, --recursive       Recursively report permissions on child entities. Will
                        report on each sub-folder/file/table that has
                        different permissions from the starting entity.

user-project-access

usage: syn-reports user-project-access [-h] [-u USERNAME] [-p PASSWORD]
                                       [-o OUT_PATH]
                                       users [users ...]

positional arguments:
  users                 The IDs and/or usernames of the users to report on.

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Synapse username.
  -p PASSWORD, --password PASSWORD
                        Synapse password.
  -o OUT_PATH, --out-path OUT_PATH
                        Path to export the report to. Specify a path that ends
                        in ".csv" to export to a specific file otherwise a
                        timestamped filename will be created in the out-path.

user-teams

usage: syn-reports user-teams [-h] [-u USERNAME] [-p PASSWORD] [-o OUT_PATH]
                              users [users ...]

positional arguments:
  users                 The IDs and/or usernames of the users to report on.

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Synapse username.
  -p PASSWORD, --password PASSWORD
                        Synapse password.
  -o OUT_PATH, --out-path OUT_PATH
                        Path to export the report to. Specify a path that ends
                        in ".csv" to export to a specific file otherwise a
                        timestamped filename will be created in the out path.

team-members

usage: syn-reports team-members [-h] [-u USERNAME] [-p PASSWORD] [-o OUT_PATH]
                                teams [teams ...]

positional arguments:
  teams                 The IDs and/or names of the teams to report on.

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Synapse username.
  -p PASSWORD, --password PASSWORD
                        Synapse password.
  -o OUT_PATH, --out-path OUT_PATH
                        Path to export the report to. Specify a path that ends
                        in ".csv" to export to a specific file otherwise a
                        timestamped filename will be created in the out path.

Development Setup

pipenv --three
pipenv shell
make pip_install
make build
make install_local

See Makefile for all commands.

Project details


Release history Release notifications

Download files

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

Files for syn-reports, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size syn_reports-0.0.1-py2.py3-none-any.whl (23.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size syn-reports-0.0.1.tar.gz (15.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page