Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
dash-cytoscape
Advanced tools
A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js
A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js
Interacting with the stylesheet:
Interacting with the elements:
Make sure that the following python packages are installed:
dash==0.28.5
dash-renderer==0.14.3
dash-html-components==0.13.2
dash-core-components==0.34.0
Older versions are not necessarily incompatible, but have not been extensively tested.
Install the library using pip:
pip install dash-cytoscape
Create the following example inside an app.py
file:
import dash
import dash_cytoscape
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([
dash_cytoscape.Cytoscape(
id='cytoscape',
elements=[
{'data': {'id': 'one', 'label': 'Node 1'}, 'position': {'x': 50, 'y': 50}},
{'data': {'id': 'two', 'label': 'Node 2'}, 'position': {'x': 200, 'y': 200}},
{'data': {'source': 'one', 'target': 'two','label': 'Node 1 to 2'}}
],
layout={'name': 'preset'}
)
])
if __name__ == '__main__':
app.run_server(debug=True)
Please follow the following steps for local testing:
$ git clone https://github.com/plotly/dash-cytoscape.git
$ yarn
$ yarn run build:all
$ python setup.py install
It is recommended to install the library and running the examples in a fresh virtualenv in a separate folder:
$ mkdir dash_cytoscape_dev
$ cd dash_cytoscape_dev
$ virtualenv venv # Create a virtual env
$ source venv/bin/activate # Activate the venv
To activate in windows:
> venv\Scripts\activate
(and then repeat step 3).
For using Dash and for a Python-specific overview of Dash Cytoscape, view the Dash User Guide. It's chock-full of examples, pro tips, and guiding principles.
For supplementary information about the underlying javascript API, view the Cytoscape.js documentation.
Our preferred package manager for this project is Yarn. Therefore we use yarn.lock
rather than package-lock.json
. If you decide to start using npm for package management (which will create package-lock.json) and you commit this project to Dokku, make sure to delete yarn.lock
.
Dash, Cytoscape.js and Dash Cytoscape are licensed under MIT. Please view LICENSE for more details.
See https://plot.ly/dash/support for ways to get in touch.
Huge thanks to the Cytoscape Consortium and the Cytoscape.js team for their contribution in making such a complete API for creating interactive networks. This library would not have been possible without their massive work!
[0.0.2] - 2018-11-08
FAQs
A Component Library for Dash aimed at facilitating network visualization in Python, wrapped around Cytoscape.js
The npm package dash-cytoscape receives a total of 80 weekly downloads. As such, dash-cytoscape popularity was classified as not popular.
We found that dash-cytoscape demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.