semvec/pypi-packages huggingface dataset:
seatools-starter-server-uvicorn 1.0.4
Seatools Starter Server Uvicorn
Requires Python: >=3.9
Keywords: seatools, server, uvicorn

# seatools uvicorn 服务器启动器

该框架在`uvicorn`层完成`seatools.ioc`的加载, 使用该项目后无需在每个进程额外执行`seatools.ioc.run`函数, 仅在启动时传递一个`ioc`启动的函数即可

## 版本说明
- 1.0.4 版本支持 uvicorn>=0.36 版本
- 1.0.3 版本支持 uvicorn<=0.35 版本

## 使用指南
1. 安装, `poetry add seatools-starter-server-uvicorn`
2. 这里以`fastapi`为例, 假设`xxx.boot`模块存在`start`的自定义启动`ioc`函数

```python
from seatools.ioc import run


def start():
    run(scan_package_names='xxx', config_dir='./config')

```
命令行启动`uvicorn xxx.boot:start xxx.fastapi.app:app`, 其他参数与官方`uvicorn`一致, 在`uvicorn`基础上增加了一个`ioc_app`的参数, 需要指明`ioc`应用启动的函数
若配置`application.yml`或`application-[*].yml`中存在`seatools.server.uvicorn.app`配置, 则可不传递`uvicorn`的`app`仅传递`ioc_app`即可, 示例`uvicorn xxx.boot:start`
若同时使用了`seatools-starter-web-*`的`web`启动包, 则`uvicorn`的`app`直接可省略
3. 程序直接调用

```python
from xxx.boot import start
from seatools.ioc.server import uvicorn


def main():
    uvicorn.run(
        start,
        'xxx.fastapi.app:app' # 配置中seatools.server.uvicorn.app存在 或 安装了seatools-starter-web-fastapi 此处可不填
    )


if __name__ == '__main__':
    main()

```
4. 支持配置`config/application.yml`
```yaml
seatools:
  server:
    uvicorn:
      # 配置该参数后启动参数可忽略app参数, 配置与官方uvicorn.run一致, 若安装 seatools-starter-web-fastapi可省略app配置 
      app: xxx.fastapi.app:app
      host: 127.0.0.1
      port: 8000
      workers: 1
      # ...
    
```
pytng 0.3.4
Minimal Cython wrapper of the TNG trajectory library
Requires Python: >=3.9

===========================================
pytng - A python library to read TNG files!
===========================================

.. image:: https://github.com/MDAnalysis/pytng/workflows/build/badge.svg
  :target: https://github.com/MDAnalysis/pytng/actions
.. image:: https://github.com/MDAnalysis/pytng/workflows/docs/badge.svg
  :target: https://github.com/MDAnalysis/pytng/actions
.. image:: https://badge.fury.io/py/pytng.svg
  :target: https://badge.fury.io/py/pytng
.. image:: https://codecov.io/gh/MDAnalysis/pytng/branch/master/graph/badge.svg
  :target: https://codecov.io/gh/MDAnalysis/pytng
.. image:: https://zenodo.org/badge/92180386.svg
   :target: https://zenodo.org/badge/latestdoi/92180386


This package provides the ``TNGFileIterator`` object to allow simple Pythonic
access to data contained within TNG files.

.. code-block:: python

  import pytng
  import numpy as np

  with pytng.TNGFileIterator('traj.tng', 'r') as tng:

    positions = np.empty(shape=(tng.n_atoms,3), dtype=np.float32)

    for ts in tng:
      time = ts.get_time()
      positions = ts.get_positions(positions)

This package contains Python bindings to libtng_ for TNG file format[1_] [2_].
This is used by molecular simulation programs such as Gromacs_ for storing the
topology and results from molecular dynamics simulations.

Warning
=======

This package is under active development. The API is liable to change
between release versions.

.. _libtng: https://gitlab.com/gromacs/tng
.. _1: http://link.springer.com/article/10.1007%2Fs00894-010-0948-5
.. _2: http://onlinelibrary.wiley.com/doi/10.1002/jcc.23495/abstract
.. _Gromacs: http://manual.gromacs.org/


Installation
============

To install using pip, simply run

.. code-block:: sh

  pip install pytng

To install the latest development version from source, run

.. code-block:: sh

  git clone git@github.com:MDAnalysis/pytng.git
  cd pytng
  python setup.py install


Getting help
============

For help using this library, please drop by the `GitHub issue tracker`_.

.. _GitHub issue tracker: https://github.com/MDAnalysis/pytng/issues