Skip to content

Commit

Permalink
Merge branch 'master' into protocols/smtp_client
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Aug 22, 2021
2 parents 327b004 + d8caba0 commit f906bef
Show file tree
Hide file tree
Showing 182 changed files with 1,031 additions and 620 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy Workflow
on:
push:
tags:
- "*"
jobs:
build:
name: Build
strategy:
matrix:
python-version: [2.7]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
- run: python --version
- run: pip install -r requirements.txt
- run: HTTPBIN=httpbin.bemisc.com python setup.py test
- run: pip install twine wheel
- run: python setup.py sdist bdist_wheel
- run: python -m twine upload -u ${PYPI_USERNAME} -p ${PYPI_PASSWORD} dist/*
env:
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Main Workflow
on: [push]
jobs:
build:
name: Build
strategy:
matrix:
python-version: [2.7, 3.5, 3.6, 3.7, rc]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v1
- run: python --version
- run: pip install -r requirements.txt
- run: HTTPBIN=httpbin.bemisc.com python setup.py test
29 changes: 10 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sudo: false
dist: trusty
language: python
python:
Expand All @@ -7,33 +6,25 @@ python:
- "3.5"
- "3.6"
- "nightly"
- "pypy-5.4.1"
- "pypy-5.6.0"
- "pypy-5.7.1"
- "pypy2.7-5.8.0"
- "pypy3.5-5.8.0"
- "pypy3"
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
- python: 3.8
dist: xenial
- python: pypy
dist: xenial
- python: pypy3
dist: xenial
before_install:
- pip install --upgrade pip setuptools
install:
- pip install -r requirements.txt
- pip install coveralls
- if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then pip install coveralls; fi
env:
- HTTPBIN=httpbin.bemisc.com
script: coverage run --source=netius setup.py test
after_success: coveralls
deploy:
provider: pypi
user: joamag
password:
secure: eMa8FOTkChzUO8q1GZn6AzJ5AMK5FNTQ4dGCo6clOgsevZrT16MyPfL56oz6wc/2oLVsqBSi9vSKHQiQuGVKbrsjh+R8UiGZ3ul6WMdyU+qCLR7MzKsZRljybs4fLMKSa3wT7RepCxjSSiDTSvx1GnFa8MUPtRQ1x++V02dR7ec=
distributions: sdist bdist_wheel
on:
tags: true
python: "2.7"
script: if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run --source=netius setup.py test; else python setup.py test; fi
after_success: if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coveralls; fi
notifications:
slack: hivesolutions:838m5XXohsuxjWI0mSzghWOK
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Python",
"type": "python",
"request": "launch",
"pythonPath": "${config:python.pythonPath}",
"python": "${command:python.interpreterPath}",
"program": "${file}",
"debugOptions": [
"RedirectOutput"
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added

*

### Changed

*

### Fixed

*

## [1.18.2] - 2021-05-01

### Added

* Support for `redirect_regex` in `proxy_r`
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ result = netius.clients.HTTPClient.get_s(
)
print(result["data"])
```

#### Asynchronous usage

```python
Expand All @@ -86,12 +87,14 @@ netius.clients.HTTPClient.get_s(

The servers that come with netius out-of-the-box, can be tested through the command line:

* WSGIServer - `python -m netius.servers.wsgi`
* FTPServer - `python -m netius.servers.ftp`
* HelloServer - `MESSAGE="Hello Netius" python -m netius.extra.hello`
* FileServer - `BASE_PATH=/ python -m netius.extra.file`
* SMTPServer - `python -m netius.servers.smtp`
* RelaySMTPServer - `python -m netius.extra.smtp_r`
| Class | Example |
| --------------- | ----------------------------------------------------- |
| WSGIServer | `python -m netius.servers.wsgi` |
| FTPServer | `python -m netius.servers.ftp` |
| HelloServer | `MESSAGE="Hello Netius" python -m netius.extra.hello` |
| FileServer | `BASE_PATH=/ python -m netius.extra.file` |
| SMTPServer | `python -m netius.servers.smtp` |
| RelaySMTPServer | `python -m netius.extra.smtp_r` |

## Learn more

Expand All @@ -109,7 +112,8 @@ Netius is currently licensed under the [Apache License, Version 2.0](http://www.

## Build Automation

[![Build Status](https://travis-ci.org/hivesolutions/netius.svg?branch=master)](https://travis-ci.org/hivesolutions/netius)
[![Build Status](https://travis-ci.com/hivesolutions/netius.svg?branch=master)](https://travis-ci.com/hivesolutions/netius)
[![Build Status GitHub](https://github.com/hivesolutions/netius/workflows/Main%20Workflow/badge.svg)](https://github.com/hivesolutions/netius/actions)
[![Coverage Status](https://coveralls.io/repos/hivesolutions/netius/badge.svg?branch=master)](https://coveralls.io/r/hivesolutions/netius?branch=master)
[![PyPi Status](https://img.shields.io/pypi/v/netius.svg)](https://pypi.python.org/pypi/netius)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)
Loading

0 comments on commit f906bef

Please sign in to comment.