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] [-a] 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. -a, --all Report permissions on every entity regardless of the parent permission.
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
Release history Release notifications | RSS feed
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.15.tar.gz
(20.1 kB
view hashes)
Built Distribution
Close
Hashes for syn_reports-0.0.15-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12737a44cba3c770a4912b40493c082859efc110335d6f17db045bd8485bd753 |
|
MD5 | 5e7b9cb627b8c55b967afb1bd2f385b9 |
|
BLAKE2-256 | 73eae778368414d441656797e69100b2dfecb4c95bf40414f4a20eeace91723f |