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]
                   {benefactor-permissions,entity-permissions,user-project-access,user-teams,team-members}
                   ...

Synapse Reports

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

Commands:
  {benefactor-permissions,entity-permissions,user-project-access,user-teams,team-members}
    benefactor-permissions
                        Report the unique permissions on a Synapse entity and
                        all its child entities.
    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.

benefactor-permissions

sage: syn-reports benefactor-permissions [-h] [-u USERNAME] [-p PASSWORD]
                                          [-o OUT_PATH]
                                          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.

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]
                              [--has-member [HAS_MEMBER]]
                              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.
  --has-member [HAS_MEMBER]
                        Only report teams that also have this user in the
                        team.

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


Download files

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

Source Distribution

syn-reports-0.0.7.tar.gz (18.7 kB view hashes)

Uploaded Source

Built Distribution

syn_reports-0.0.7-py2.py3-none-any.whl (30.6 kB view hashes)

Uploaded Python 2 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