semvec/pypi-packages huggingface dataset:
python-ew 2.1.5
Allow reading from and writing to Earthworm shared memory ring buffers.
Requires Python: >=3.6

python-ew
=========

This is a 2019 updating of the [PythonEw](https://github.com/osop/osop-python-ew) Python 2.x compatible modules by
[OSOP](http://www.osop.com.pa) to work with Python 3.x

`python-ew` is a Python wrapper for accessing a Earthworm shared memory rings, allowing you to extend the Earthworm
system with Python code.

[Earthworm](http://earthwormcentral.org) itself is a set of open source programs, tools and libraries that are used in
the development of software for maintaining seismic networks, research and other seismological and geophysical
applications.

**Supported message types**:

* `TYPE_HEARTBEAT`: `python_ew.HeartBeatRing`
* `TYPE_STATUS`: `python_ew.StatusRing`, `python_ew.StatusMessage`
* `TYPE_TRACEBUF2`: `python_ew.Tracebuf2Ring`, `python_ew.Tracebuf2Message`


## Installation

In order to install `python-ew`, you need to have first installed Earthworm itself.  This module builds successfully on
Linux against `earthworm-7.9` compiled with `EWBITS=64` and with "`-m64 -fPIC`" added to `GLOBALFLAGS` in
`${EW_HOME}/environment/ew_linux.bash`.  Your milage may vary for other versions of Earthworm, or on other platforms.

To compile the `python-ew` C extensions, we need to find the Earthworm `.o` and `.h` files.  We'll look in the following
places:

Libraries:

* `${EW_HOME}/lib`
* `${EW_HOME}/earthworm_7.9/lib`

Include files:

* `${EW_HOME}/include`
* `${EW_HOME}/earthworm_7.9/include`

Thus, ensure that the `EW_HOME` environment variable is set apporpriately.

Then:

```
pip install python-ew
```

## Example usage

### Reading TRACEBUF2 messages

Let's say your ring with `TYPE_TRACEBUF2` messages is named `WAVE_RING`, and you want to get all messages regardless of
what module created them:

```
> python3
>>> from python_ew import Tracebuf2Ring
>>> ring = Tracebuf2Ring('WAVE_RING', 'MOD_WILDCARD')
>>> messages = ring.read()
>>> messages[0]
{'pinno': 0, 'nsamp': 100, 'starttime': 1564770703.968393, 'endtime': 1564770704.958393, 'samprate': 100.0, 'sta': 'FOO', 'net': 'XX', 'chan': 'HNN', 'loc': '--', 'version': '20', 'datatype': 'i4', 'quality': '', 'pad': '', 'samples': [-22129, -22130, -22131, -22132, -22129, -22130, -22128, -22128, -22130, -22128, -22130, -22128, -22128, -22129, -22129, -22129, -22129, -22130, -22127, -22128, -22129, -22128, -22128, -22130, -22131, -22128, -22131, -22131, -22128, -22128, -22132, -22130, -22125, -22128, -22129, -22126, -22128, -22130, -22133, -22132, -22131, -22132, -22130, -22131, -22128, -22129, -22132, -22127, -22129, -22129, -22129, -22132, -22130, -22127, -22129, -22131, -22127, -22128, -22131, -22128, -22128, -22130, -22129, -22130, -22129, -22128, -22133, -22128, -22129, -22133, -22131, -22130, -22128, -22131, -22130, -22128, -22132, -22132, -22129, -22127, -22129, -22132, -22130, -22132, -22133, -22128, -22129, -22130, -22129, -22130, -22128, -22129, -22130, -22131, -22130, -22128, -22129, -22130, -22129, -22129]}
````
huasampleproject 1.3.1
A sample Python project
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4
Keywords: sample setuptools development

# A sample Python project

A sample project that exists as an aid to the [Python Packaging User
Guide][packaging guide]'s [Tutorial on Packaging and Distributing
Projects][distribution tutorial].

This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.

[The source for this project is available here][src].

Most of the configuration for a Python project is done in the `setup.py` file,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.

----

This is the README file for the project.

The file should use UTF-8 encoding and can be written using
[reStructuredText][rst] or [markdown][md use] with the appropriate [key set][md
use]. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.

Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.

[packaging guide]: https://packaging.python.org
[distribution tutorial]: https://packaging.python.org/tutorials/packaging-projects/
[src]: https://github.com/pypa/sampleproject
[rst]: http://docutils.sourceforge.net/rst.html
[md]: https://tools.ietf.org/html/rfc7764#section-3.5 "CommonMark variant"
[md use]: https://packaging.python.org/specifications/core-metadata/#description-content-type-optional