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.11.tar.gz
(19.3 kB
view hashes)
Built Distribution
Close
Hashes for syn_reports-0.0.11-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d260f0dba8a64f45309d8872aeff9d2b1e5499f4fbe781a3ecb4395e931f0e74 |
|
MD5 | 035510274be7f7c345353642966f2041 |
|
BLAKE2b-256 | c4312bdbc09e5f3bcf540f467677427752987be6c4aa42c32bcc1fb4a0560661 |