semvec/pypi-packages huggingface dataset:
railyard 0.1.0
Simple local application development server
Requires Python: >=3.7
Keywords: webapp dispatch routing

railyard
========

Local application development server
------------------------------------

Features
========
* Basic compatibility with Google App Engine `app.yaml <https://cloud.google.com/appengine/docs/standard/python3/config/appref>`_ files
* Basic compatibility with Google App Engine `dispatch.yaml <https://cloud.google.com/appengine/docs/standard/python3/reference/dispatch-yaml>`_ files
* Support for static files

Use
===

To run an application defined in a :code:`app.yaml` file::

  $ railyard app.yaml

To run an application which uses a :code:`dispatch.yaml` file::

  $ railyard dispatch.yaml

Railyard will first search the folder it is run from for the service definition files, failing that, it will search folders matching the service names. For example, take the following :code:`dispatch.yaml`::

  dispatch:
    - url: "*/app1/*"
      service: app1

    - url: "*/app2/*"
      service: app2

Railyard will use files in the following order:

* :code:`./app1.yaml`
* :code:`./app1/app1.yaml`
* :code:`./app2.yaml`
* :code:`./app2/app2.yaml`

Options
-------

:code:`-e`, :code:`--entrypoint` = :code:`ENTRYPOINT`

Overrides the entrypoint defined in the input file(s) with the given :code:`ENTRYPOINT`.

When input is a :code:`dispatch.yaml` file, an :code:`ENTRYPOINT` must be provided for each :code:`service` defined in the :code:`dispatch.yaml` file. The :code:`ENTRYPOINT` overrides must be specified in the same order as the code:`service` definitions in :code:`dispatch.yaml` file.

Development
===========

Setup
-----

It is recommended to develop using a `pipenv <https://pipenv.kennethreitz.org/en/latest/>`_.

A development environment can be set up automatically::

  $ pipenv install --dev

You can work directly inside the development environment::

  $ pipenv shell

From inside the development environment, you can install the pre-commit hooks using `pre-commit <https://pre-commit.com/>`_::

  $ pre-commit install

To run the pre-commit hooks manually::

  $ pre-commit run --all-files

Tests
-----

To run the unit tests::

  $ python -m unittest

The pre-commit tests are run using `coverage <https://coverage.readthedocs.io/>`_. To see where the coverage tests are failing::

  $ coverage report -m
ndenv 0.0.7
Handle .env files
Requires Python: >=3.6

Python Dot Env Handler
======================

[![Build Status](https://travis-ci.org/jtprog/ndenv.svg?branch=master)](https://travis-ci.org/jtprog/ndenv)


Based on [ https://github.com/pedroburon/dotenv ](https://github.com/pedroburon/dotenv)

Shell Command and Library to write and read `.env` like files.

`.env` files are commonly used with `Procfile`-based apps.

Usage
-----

### Shell

Inspect file

```shell
$ ndenv
FOO: bar
Bar: baz
```

Get value for key

```shell
$ ndenv FOO
FOO: bar
```

Set value for key

```shell
$ ndenv FOO baz
FOO: baz
```

### As a library

```python
>>> from ndenv import NDenv
>>> ndenv = NDenv('/path/to/.env')
>>> print ndenv
{"FOO": "bar", "Bar": "baz"}
>>> ndenv['FOO']
"bar"
>>> ndenv['FOO'] = "baz"
>>> ndenv['FOO']
"baz"
>>> del ndenv['FOO']
>>> print ndenv
{"Bar": "baz"}
```

> Every action is persisted.


### Use with Django

```python
# add this to manage.py above `execute_from_command_line(sys.argv)`

from ndenv import NDenv
ndenv = NDenv(os.path.join(os.path.dirname(__file__), '.env'))
os.environ.update(ndenv)

```