semvec/pypi-packages huggingface dataset:
markmodule 0.3.0
Import python code in markdown as module
License: MIT
Keywords: markdown

# markmodule
Import python from markdown files.

## Usage

In a file named `hello_module.md` define a function. I'm escaping the fence, use a real three-tick fence.

```markdown
Here is a function

``(`)python
def hello() -> str:
    return "Hello"
``(`) 
```

Generate a type stub and import using the usual syntax. `generate_side_by_side_pyi` will write a `.pyi` file to the file system and enable IDEs type hinting to work.

```python
import sys
import markmodule
markmodule.generate_side_by_side_pyi("hello_module")
sys.meta_path.append(markmodule.MdFinder())
import hello_module
print(hello_module.hello())
```

Import with path to file.
```python
import markmodule
markmodule.import_md("hello_module.md")
import hello_module
print(hello_module.hello())
```

## Markdown is a hammer, everything is a nail

You can use markdown:

- as a place to put module code, [markmodule](https://pypi.org/project/markmodule), this library

The do-everything-with-markdown ecosystem is surprisingly robust.
- as a Makefile alternative, [mask](https://github.com/jacobdeichert/mask)
- as a place to put scripts, eg python's [markdown-exec](https://pypi.org/project/markdown-exec/), or ruby's [markdown_exec](https://github.com/fareedst/markdown_exec)
- as a place to put unit tests, [pytest-markdown-docs](https://pypi.org/project/pytest-markdown-docs/),  [pytest-codeblocks](https://pypi.org/project/pytest_codeblocks/), and [pytest-markdown](https://pypi.org/project/pytest-markdown/)
- as a string template, [proof-of-concept gist](https://gist.github.com/facelessuser/53fa4d93f27c252fda813b5e0ba7325c)


## Change Log

- 0.1.0 - Basic idea.
- 0.2.0 - Updates to readme
- 0.3.0 - Generates pyi and you can use `import` syntax 

## Documentation

- [Contributing](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/contributing.md)
- [TODO](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/TODO.md)
- [Related StackOverflow Links](https://github.com/matthewdeanmartin/markmoduel/blob/main/docs/stackoverflow.md)
sysdm 0.8.67
Scripts as a service. Builds on systemd.
License: MIT

<p align="center">
  <img src="logo.png" width="300px"/>
</p>

[![PyPI](https://img.shields.io/pypi/v/sysdm.svg?style=flat-square)](https://pypi.python.org/pypi/sysdm/)
[![PyPI](https://img.shields.io/pypi/pyversions/sysdm.svg?style=flat-square)](https://pypi.python.org/pypi/sysdm/)

# sysdm

Scripts as a service. Builds on systemd.

It gives you the best from screen, cronjobs, supervisord, systemctl and journalctl.

### Installation

    pip install sysdm

### Demo

<p align="center">
  <img src="https://raw.githubusercontent.com/kootenpv/sysdm/master/demo.gif"/>
</p>

### Usage examples

    sysdm create myfile.py               # creates, starts and enables a new service file
    sysdm create myfile.py --timer daily # the above + schedules it to run daily
    sysdm ls                             # see the known services created by sysdm
    sysdm delete                         # see the known services and select to delete
    sysdm run                            # run the app in the foreground (e.g for debugging)

### Features

Creating and viewing have just helped you with:

- Generate a systemd unit file on the fly
- Uses current info to determine, and pin, working directory and virtualenv paths in your unit.
- Script will start running, and also boot on start
- Script will restart on error
- Script can also be started on a schedule (e.g. `--timer daily`), using systemd timers
- Changes to files in the directory of the same extension will cause a reload (e.g. `.py`)
- Provides a UI for inspecting the logs of your script and start, stop etc
- Like with screen, you can leave and it will keep on running.
- Multiple people can look at it, too, when sharing a server.
- Provides flags to change settings
- UI is aware of the window-size