
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
dataflows-elasticsearch
Advanced tools
A utility library for working with data flows in Python and ElasticSearch
Dataflows's processors to work with ElasticSearch
dump_to_elasticsearch
processorThe package use semantic versioning. It means that major versions could include breaking changes. It's recommended to specify package
version range in your setup/requirements
file e.g. package>=1.0,<2.0
.
$ pip install dataflows-elasticsearch
These processors have to be used as a part of a dataflows Flow
. For example:
flow = Flow(
load('data/data.csv'),
dump_to_es(
engine='localhost:9200',
),
)
flow.process()
Saves the Flow to an ElasticSearch Index.
indexes
- Mapping of indexe names to resource names, e.g.{
'index-name-1': {
'resource-name': 'resource-name-1',
},
'index-name-2': {
'resource-name': 'resource-name-2',
},
# ...
}
mapper_cls
- Class to be used to map json table schema types into ElasticSearch typesindex_settings
- Options to be used when creating the ElasticSearch indexengine
- Connection string for connecting the ElasticSearch instance, or an Elasticsearch
object.
Can also be of the form env://ENV_VAR
, in which case the connection string will be fetched from the environment variable ENV_VAR
.elasticsearch_options
- Options to be used when creating the Elasticsearch
object (in case it wasn't provided)The project follows the Open Knowledge International coding standards.
The recommended way to get started is to create and activate a project virtual environment. To install package and development dependencies into your active environment:
$ make install
To run tests with linting and coverage:
$ make test
For linting, pylama
(configured in pylama.ini
) is used. At this stage it's already
installed into your environment and could be used separately with more fine-grained control
as described in documentation - https://pylama.readthedocs.io/en/latest/.
For example to sort results by error type:
$ pylama --sort <path>
For testing, tox
(configured in tox.ini
) is used.
It's already installed into your environment and could be used separately with more fine-grained control as described in documentation - https://testrun.org/tox/latest/.
For example to check subset of tests against Python 2 environment with increased verbosity.
All positional arguments and options after --
will be passed to py.test
:
tox -e py37 -- -v tests/<path>
Under the hood tox
uses pytest
(configured in pytest.ini
), coverage
and mock
packages. These packages are available only in tox envionments.
The full changelog and documentation for all released versions can be found in the nicely formatted commit history.
FAQs
A utility library for working with data flows in Python and ElasticSearch
We found that dataflows-elasticsearch demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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 uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.