semvec/pypi-packages huggingface dataset:
ens-permissions 0.2.1
Add a short description here!
License: MIT

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)

# Permissions audit package

This project defines a simple library for obtaining smart contract permissions and building a graph.

It's aimed at contracts using [Openzeppelin's AccessControl module](https://docs.openzeppelin.com/contracts/3.x/api/access#AccessControl).

There's a frontend for this at https://ensuro.co/ens-permissions-frontend/

# Development

There's an app developed for Google Cloud Functions.

To run the function locally you will need a virtualenv with `functions-framework` and the app requirements:

```
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt -r requirements.dev.txt
pip install -e .
```

## Running the function locally

Requires a few environment variables. See [.env.sample](.env.sample).

```
cp .env.sample .env

# Review .env vars
$EDITOR .env

# Run the function
functions_framework --debug --target=permissions_graph
```

Then test it with:

```
curl -o test.gv http://127.0.0.1:8080/?address=0x47E2aFB074487682Db5Db6c7e41B43f913026544

dot -Tsvg test.gv > test.svg
```

# Deployment

Edit `config/environment.yml` with your config and then deploy with gcloud:

```
gcloud functions deploy permissions_graph \
    --env-vars-file config/environment.yml \
    --runtime python39 --trigger-http --allow-unauthenticated
```

# TODO

- Deploy app from github actions
- Split `ens_permissions` into its own pypi library
- Add support for `Ownable` contracts
- Address book
- Add multisig intelligence (detect when a role member is a multisig and obtain its members)
- Timelock detection
stringdb-alias 1.0
A python package for working with string-db.org aliases (gene and protein ID mapping).
License: MIT
Requires Python: >=3.6

stringdb_alias
==============

A python package for working with string-db.org aliases (gene and
protein ID mapping).

This package is specifically for working offline using downloaded files.
For accessing the STRINGdb API instead, see for example the
`stringdb <https://pypi.org/project/stringdb/>`__ package.

Usage
-----

Mapping HGNC symbols
~~~~~~~~~~~~~~~~~~~~

First, download the aliases and info files from string-db.org:

::

   $ wget https://stringdb-static.org/download/protein.info.v11.5/9606.protein.info.v11.5.txt.gz
   $ wget https://stringdb-static.org/download/protein.aliases.v11.5/9606.protein.aliases.v11.5.txt.gz

Then, initialize our mapper object with the downloaded files, and map
lists of IDs

::

   from stringdb_alias import HGNCMapper

   mapper = HGNCMapper('9606.protein.info.v11.5.txt.gz', '9606.protein.aliases.v11.5.txt.gz')

   print(mapper.get_string_ids(['ADCK2', 'TOMM7', 'PRODH']))

The mapper always returns a `pandas
Series <https://pandas.pydata.org/pandas-docs/stable/reference/series.html>`__.
This is convenient for directly mapping a column in a
`DataFrame <https://pandas.pydata.org/pandas-docs/stable/reference/frame.html>`__.
Moreover, if the input list is a pandas Series, the index is preserved
in the output.