A quick reference guide for the Pythonista in the process of becoming a Rustacean
# py2rs

## From Python into Rust 

```rust
let x = Rust::from("Python");
```

A quick reference guide for the **Pythonista** in process of becoming a **Rustacean**. 


![image_2017-11-28_08-03-59](https://user-images.githubusercontent.com/458654/33350327-50e76baa-d485-11e7-8a6e-b3dd0c337046.png)


## Top Contributors

[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/0)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/0)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/1)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/1)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/2)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/2)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/3)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/3)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/4)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/4)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/5)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/5)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/6)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/6)[![](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/images/7)](https://sourcerer.io/fame/rochacbruno/rochacbruno/py2rs/links/7)

Add yourself, send a PR!

### Monty Python - Season 3 - Episode 49

[The sketch](http://montypython.50webs.com/scripts/Series_3/49.htm)

```
Mrs. Jalin: George.
Mr. Jalin: Yes, Gladys.
Mrs. Jalin: There's a man at the door with a moustache.
Mr. Jalin: Tell him I've already got one. (Mrs. Jalin hits him hard with a newspaper) 
          All right, all right. What's he want then?
Mrs. Jalin: He says do we want a documentary on crustaceans.
Mr. Jalin: Crustaceans!
Mrs. Jalin: Yes.
Mr. Jalin: What's he mean, crustaceans?
Mrs. Jalin: CRUSTACEANS!! GASTROPODS! LAMELLIBRANCHS! CEPHALOPODS!
...
```

Ok... [watch it later...](https://www.youtube.com/watch?v=8R2zvE615dM) let's learn some Rust now...

## TOC

- [Getting Started with Rust](https://github.com/rochacbruno/py2rs#getting-started-with-rust)
- [Where to exercise](https://github.com/rochacbruno/py2rs#exercises)
- [Where to be informed on news and updates](https://github.com/rochacbruno/py2rs#getting-updated)
- [Interacting with Rustacean Communities](https://github.com/rochacbruno/py2rs#interact-with-other-rustaceans)
- [Additional learning Resources](https://github.com/rochacbruno/py2rs#additional-learning-resources)
- [Curious Facts](https://github.com/rochacbruno/py2rs#facts)
- [py2rs: Glossary of terms](https://github.com/rochacbruno/py2rs#glossary-of-terms)
- [py2rs: General fact comparison](https://github.com/rochacbruno/py2rs#general)
- [py2rs: Environment Tools](https://github.com/rochacbruno/py2rs#environment-tools)
- [py2rs: Libraries and Frameworks](https://github.com/rochacbruno/py2rs#libraries-and-frameworks)
- [py2rs: Applications](https://github.com/rochacbruno/py2rs#applications)
- [py2rs: Useful Crates](https://github.com/rochacbruno/py2rs#useful-crates)
- [py2rs: Code comparison Python X Rust implementations](https://github.com/rochacbruno/py2rs#show-me-the-code)
- [Credits](https://github.com/rochacbruno/py2rs#credits)

## Getting Started with Rust

Assuming you already know what is [**Rust**](http://rust-lang.org) and already 
decided to start learning it. Here are some steps for you to follow:

1) Take a tour of **Rust Syntax** and **Coding Style**  
   https://learnxinyminutes.com/docs/rust/
2) Watch some **screencasts** to get basics of **Ownership &Borrowing** concept  
   http://intorust.com/
3) Follow this set of runnable examples to understand how everything fit together  
   https://rustbyexample.com
4) Now it is time to read your first book, you can pick:  
    * **Rust Essentials**  
      > A good introduction to Rust language in a more `superficial` approach which results
      > in a very pleasant and easy reading, recommended even for those who are not experienced
      > with low level systems languages.  
        * Paparback and e-book available on Packt Publisher  
          https://www.packtpub.com/application-development/rust-essentials-second-edition

    * **TRPL** (The Rust Programming language Book)   
      > A complete Guide to Rust Language  
      > https://doc.rust-lang.org/book/   
        * Official Book  
        * Free to read online  
        * Available as paperback or e-book (buy at Amazon)
5) Read some real examples
    * **Rust Cookbook**  
     https://rust-lang-nursery.github.io/rust-cookbook/
     This Rust Cookbook is a collection of simple examples that demonstrate good 
     practices to accomplish common programming tasks, using the crates of the Rust ecosystem.
    * **Anthology**  
    https://github.com/brson/rust-anthology/blob/master/master-list.md 
6) Patterns and Good Practices  
   * **Rust Patterns** https://github.com/rust-unofficial/patterns
   * **API Guidelines** https://rust-lang-nursery.github.io/api-guidelines/

## Exercises

Time to put your new knowledge in action solving some exercises.

1) **Exercism.io**  
   Register a new account on exercism.io (using github auth)  
   Install exercism command line client on your computer  
   Solve some exercises:  http://www.exercism.io/languages/rust/about 

2) **Rust Playground**  
   Run Live Rust Code in the browser with https://play.rust-lang.org/

## Getting updated

Now I assume you are addicted to **Rust** and you want to be updated about everything 
around it, here are some good links to follow.

1) This Week in Rust Newsletter  
   https://this-week-in-rust.org/   
   https://twitter.com/thisweekinrust 
2) Awesome Rust Newsletter  
   https://rust.libhunt.com/
3) Reddit  
   http://reddit.com/r/rust   (serious sub-reddit)  
   http://reddit.com/r/rustjerk (almost memes only)  
4) Official Twitter  
  https://twitter.com/rustlang

## Interact with other Rustaceans

> Don't be afraid, the Rustaceans are a very receptive species and are cozy with the Pythonistas.

### Main Community links

https://www.rust-lang.org/en-US/community.html

### Local Communities

- Brazil
    * General
        * Youtube :  http://bit.ly/canalrustbr
        * Telegram: https://t.me/rustlangbr
    * Rust BH
        * https://t.me/rustbh
    * Rust in POA
        * https://t.me/rustinpoa
        * https://www.meetup.com/Rust-in-POA/
- Indonesia
    * General
        * FB Groups (Rustaceans Indonesia) : https://fb.com/groups/RustaceansID
        * FB Groups (Rust ID)              : https://fb.com/groups/rustindo
        * Telegram (Rust Indonesia)        : https://t.me/rustindonesia
- Russia
    * General
        * FB Groups (RustyCrate)           : https://facebook.com/rustycrate/
        * Telegram (pro Rust)              : https://t.me/proRust
        
- Add your country/city here, send a Pull Request.

## Additional learning resources

- Learning Rust https://learning-rust.github.io/
- Rust Learning https://github.com/ctjhoa/rust-learning
- Rust Guidelines (WIP) https://aturon.github.io/
- Rust Design Patterns and Idioms https://github.com/rust-unofficial/patterns/
- Idiomatic Rust https://github.com/mre/idiomatic-rust
- GTK Rust Tutorial https://mmstick.github.io/gtkrs-tutorials/
- Effective use of iterators http://hermanradtke.com/2015/06/22/effectively-using-iterators-in-rust.html
- Red Hat Developers: Speed up Your Python with Rust https://developers.redhat.com/blog/2017/11/16/speed-python-using-rust/
- What's a reference in Rust? (The best article to understand `'lifetimes` and `&`) https://jvns.ca/blog/2017/11/27/rust-ref/

## Facts

- The language is named **Rust** because **"rust is as close to the bare metal as you can get".**,   
  in metal theory **rust** is the chemical layer closest to bare metal.  
  (also [Wikipedia](https://en.wikipedia.org/wiki/Rust_(programming_language)) says that the name was *possibly* inspired by the name of a Fungi)
- The Rust `trifecta` is 1) **Memory Safe**, 2) **Fast** 3) **Concurrent**
- Rust can be used for web development http://www.arewewebyet.org/
- Rust can be used for Gaming Development http://arewegameyet.com/
- Rust can be used for Machine Learning http://www.arewelearningyet.com/ 
- Lots of IDEs and Editors supports Rust https://areweideyet.com/  
  (VSCode is known to have the better support by now https://marketplace.visualstudio.com/items?itemName=kalitaalexey.vscode-rust)
- Rust packages are called `Crates` and are installed by `Cargo` explore them at http://crates.io
- In Rust there is no **Class** but **Structs**, **Enums**, **Traits**, **functions** and **macros!**
- Rust compiler was first written in **OCaml** then rewritten in Rust! (Rust is written in Rust!!!)
- Rust type system is strongly inspired by **Haskell**
- Rust **functional** style is inspired by **Erlang**
- Rust type inference is mainly inspired by **ML** and also by **Haskell**
- The main **syntax** style is inspired by **C** and **C++**
- There is no automated **Garbage Collector** so Rust frees memory based on Resource Aquisition RAII (a.k.a Ownership)
- Rust has **Generic Types**!!!
- As **Rust** is **close to bare metal** you can ship a program without the inclusion of **Rust's runtime** which makes easy to distribute programs (no need of dependencies and virtuelenvs management)
- There are **Python** code in Rust! Rust build is [bootstrapped by Python](https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py)
- Graydon Hoare (creator of Rust) is now working at **Apple** developing the **Swift** language
- Rust is the developers **most loved language** according to **Stack Overflow Survey**
- Rust is the most [**energy efficient**](https://sites.google.com/view/energy-efficiency-languages/results) language! and that is very important for environment, data center companies and maybe it can help saving your laptop and phone battery in near future. 
- There is an Operating System written in **Rust** - https://www.redox-os.org/
- Mozilla released the fastest version of Firefox (**quantum**) having many parts written on **Rust**
- The Rust mascot (unofficial) is called **Ferris** and it is a **crab** http://www.rustacean.net/  
  (There is no record of the official reason about being a crab, the reasonable history is that it was inspired by the **Rusty Crab** 
   a common species of crab and also a name of a famous restaurant.)
- To compliment your fellow Rustaceans don't say **~~cheers!~~**. Say **safe!** (**safe!** is also said when toasting with champagne at Rust conferences)

> **More facts? and curiosities** send a question here or send a Pull Request adding an interest fact to this list.

![ferris](http://www.rustacean.net/more-crabby-things/animated-ferris.gif)

## Glossary of terms

| Term      | Definition                                        |
| --------- | ------------------------------------------------- |
| crate     | A rust distributable **package**                  |
| ferris    | The unofficial Crab Mascot                        |
| Rustacean | The Rust programmer or evangelist or enthusiastic |
| nightly   | The unstable toolchain of the Rust compiler       |
| impl      | Implementation                                    |

# py2rs
## From Python into Rust 

```rust
let x = Rust::from("Python");
```

A quick reference guide for the **Pythonista** in process of becoming a **Rustacean**. 


## General
| Python                                                                       | Definition                         | Rust                                                                      |
| ---------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------- |
| [PEP8](https://www.python.org/dev/peps/pep-0008/)                            | Guidelines and conventions         | [RustAPI Guidelines](https://rust-lang-nursery.github.io/api-guidelines/) |
| [PEPS](https://www.python.org/dev/peps/)                                     | Enhancement Proposals / RFC        | [Rust RFCs](https://github.com/rust-lang/rfcs)                            |
| [PSF](https://www.python.org/psf/)                                           | Organization / Foundation          | [Mozilla Research](https://research.mozilla.org/)                         |
| [PyCon](https://www.pycon.org/)                                              | Main Conference                    | [RustConf](http://rustconf.com/)                                          |
| [Guido Van Rossum](https://twitter.com/gvanrossum)                           | Creator                            | [Graydon Hoare](https://twitter.com/graydon_pub)                          |
| 1989                                                                         | First appeared                     | 2010                                                                      |
| 1991                                                                         | First Release                      | 2012                                                                      |
| [PSF](https://docs.python.org/3/license.html)                                | License                            | Apache 2.0 and MIT                                                        |
| C                                                                            | Implemented in                     | Rust                                                                      |
| .py, .pyw, .pyc                                                              | File Extensions                    | .rs, .rlib                                                                |
| http://github.com/python/cpython                                             | Repository                         | https://github.com/rust-lang/rust                                         |
| [Pyladies](), [AfroPython]()                                                 | Diversity and Inclusion initiative | [RustBridge](https://rustbridge.github.io/)                               |
| [comp.lang.Python](https://groups.google.com/forum/#!forum/comp.lang.python) | Official Users Forum               | [users.rust-lang.org](https://users.rust-lang.org)                        |


## Environment Tools

| Python                                                                                                | Definition                              | Rust                                                                                      |
| ----------------------------------------------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------- |
| `requirements.txt`                                                                                    | Official dependency tracker file        | `Cargo.toml`                                                                              |
| `setup.py`                                                                                            | Official installator / distributor file | `Cargo.toml`                                                                              |
| [PyPI](https://pypi.org/)                                                                             | Library repository                      | [Crates.io](http://crates.io)                                                             |
| [pip](https://pypi.python.org/pypi/pip)                                                               | Library installation                    | [Cargo](http://doc.crates.io/)                                                            |
| [setuptools](https://pypi.python.org/pypi/setuptools) and [poetry](https://python-poetry.org/)        | Library distribution                    | [Cargo](http://doc.crates.io/)                                                            |
| [pbr](https://docs.openstack.org/pbr/latest/)                                                         | Library distribution                    | [Cargo](http://doc.crates.io/)                                                            |
| [pipenv](https://pypi.python.org/pypi/pipenv)                                                         | Dependency manager                      | [Cargo](http://doc.crates.io/)                                                            |
| [twine](https://pypi.python.org/pypi/twine)                                                           | Package uploader                        | [Cargo](http://doc.crates.io/) and [Semantic](https://github.com/semantic-rs/semantic-rs) |
| `venv` *                                                                                              | Isolated environments                   | [Cargo](http://doc.crates.io/)                                                            |
| [pyinstaller](https://github.com/pyinstaller/pyinstaller)                                             | Generate standalone executables         | [Cargo](http://doc.crates.io/)                                                            |
| [pyenv](https://github.com/pyenv/pyenv-installer)                                                     | Install and manage versions of language | [rustup](https://www.rustup.rs/)                                                          |
| [pydoc](https://docs.python.org/library/pydoc.html) and [sphinx](https://pypi.python.org/pypi/sphinx) | Generate documentation from code        | [rustdoc](https://doc.rust-lang.org/stable/rustdoc/) and [Cargo](http://doc.crates.io/)   |
| [python](http://python.org)                                                                           | Interpreter / Compiler                  | [rustc](https://doc.rust-lang.org/1.1.0/rustc/) and [Cargo](http://doc.crates.io/)        |
| [ipython](https://pypi.python.org/pypi/ipython)                                                       | REPL                                    | [rusti](https://github.com/murarth/rusti)                                                 |
| [ipdb](https://pypi.python.org/pypi/ipdb)                                                             | Debugger                                | [rust-gdb](https://github.com/rust-lang/rust/blob/master/src/etc/rust-gdb)                |

## Libraries and Frameworks

| Python                                                                                            | Definition                       | Rust                                                                                                              |
| ------------------------------------------------------------------------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `urllib` *                                                                                        | HTTP calls                       | [hyper](https://crates.io/crates/hyper)                                                                           |
| [requests](https://pypi.python.org/pypi/requests)                                                 | Simplified HTTP calls            | [reqwest](https://github.com/seanmonstar/reqwest)                                                                 |
| [json](https://pypi.python.org/pypi/json)                                                         | JSON parsing loading and dumping | [serde](https://github.com/serde-rs/serde)                                                                        |
| [pyYAML](https://pypi.python.org/pypi/pyyaml)                                                     | YAML parsing loading and dumping | [serde](https://github.com/serde-rs/serde)                                                                        |
| [lxml](https://pypi.python.org/pypi/lxml)                                                         | XML parsing loading and dumping  | [RustyXML](https://github.com/Florob/RustyXML)                                                                    |
| `csv` *                                                                                           | CSV parsing                      | [rust-csv](https://github.com/BurntSushi/rust-csv)                                                                |
| `datetime` *  & [Dateutils](https://pypi.python.org/pypi/dateutils)                               | Date & time                      | [Chrono](https://github.com/chronotope/chrono)                                                                    |
| [click](https://pypi.python.org/pypi/click) and [argparse](https://pypi.python.org/pypi/argparse) | CLI Framework                    | [clap](https://github.com/kbknapp/clap-rs)                                                                        |
| [docopt](https://pypi.python.org/pypi/docopt)                                                     | CLI Framework                    | [docopt](https://github.com/docopt/docopt.rs)                                                                     |
| `re` *                                                                                            | Regular Expressions              | [regex](https://github.com/rust-lang/regex)                                                                       |
| `subprocess` *                                                                                    | Run external commands            | [subprocess](https://crates.io/crates/subprocess)                                                                 |
| `multiprocessing` *                                                                               | Multiprocessing            | [Rayon](https://crates.io/crates/rayon)                                                                           |
| `logging` *                                                                                       | Logging                          | [log](https://github.com/rust-lang-nursery/log)                                                                   |
| `Pathlib` *                                                                                       | Path manipulation                | [fs](https://doc.rust-lang.org/std/fs/) and [fs_extra](https://github.com/webdesus/fs_extra)                      |
| [cryptography](https://pypi.python.org/pypi/cryptography)                                         | Crytography                      | [crypto](https://github.com/DaGenix/rust-crypto)                                                                  |
| `pickle` *                                                                                        | Object serialization             | [RON](https://github.com/ron-rs/ron)                                                                              |
| `heapq` *                                                                                         | Heap queue                       | `BinaryHeap` *                                                                                                    |
| [bottle](https://pypi.python.org/pypi/bottle)                                                     | Minimal web framework            | [Iron](https://github.com/iron/iron)                                                                              |
| [flask](https://pypi.python.org/pypi/flask)                                                       | Web framework                    | [Rocket](https://github.com/SergioBenitez/Rocket)                                                                 |
| [django](https://pypi.python.org/pypi/django)                                                     | Full stack web framework         | **DO NOT EXIST YET**                                                                                              |
| [SQL Alchemy](https://pypi.python.org/pypi/sqlalchemy)                                            | Relational database ORM          | [Diesel](https://github.com/diesel-rs/diesel)                                                                     |
| [Pymongo](https://pypi.python.org/pypi/pymongo)                                                   | MongoDB driver                   | [mongodb](https://crates.io/keywords/mongodb)                                                                     |
| [Jinja 2](https://pypi.python.org/pypi/jinja2)                                                    | Template engine                  | [Tera](https://github.com/Keats/tera)                                                                             |
| [pygtk](http://www.pygtk.org/)                                                                    | GTk desktop development          | [gtk](https://github.com/gtk-rs/gtk)                                                                              |
| [pyside](http://www.pyside.org/)                                                                  | QT desktop development           | [rust-qt](https://github.com/rust-qt)                                                                             |
| [pygame](https://pypi.python.org/pypi/pygame)                                                     | 2D UI library / gaming           | [ggez](http://ggez.rs/) & [Conrod](https://github.com/PistonDevelopers/conrod/) & [Piston](http://www.piston.rs/) |
| [unitest2](https://pypi.python.org/pypi/unittest2)                                                | Test framework                   | [Builtin]()                                                                                                       |
| [nose](https://pypi.python.org/pypi/nose)                                                         | Test runner                      | [Cargo](http://doc.crates.io/)                                                                                    |
| [pytest](https://pypi.python.org/pypi/pytest)                                                     | Testing framework and runner     | [Polish](https://github.com/AlKass/polish)                                                                        |
| [Flake8](https://pypi.python.org/pypi/flake8)                                                     | Linter                           | [Clippy](https://github.com/rust-lang-nursery/rust-clippy)                                                        |
| [autopep8](https://pypi.python.org/pypi/autopep8) and [black](https://pypi.org/project/black/)    | Auto formatter                   | [rustfmt]()                                                                                                       |
| [twisted](https://pypi.python.org/pypi/twisted)                                                   | Network application framework    | [libpnet](https://github.com/libpnet/libpnet)                                                                     |
| `AsyncIO` *                                                                                       | Async application framework      | [Tokio](https://github.com/tokio-rs/tokio) and [futures](https://github.com/alexcrichton/futures-rs)              |
| [Pillow](https://pypi.python.org/pypi/pillow)                                                     | Image manipulation               | [Image](https://github.com/PistonDevelopers/image)                                                                |
| [Beautiful Soup](https://pypi.python.org/pypi/beautifulsoup4)                                     | HTML parser                      | [html5ever](https://github.com/servo/html5ever)                                                                   |
| [Hypothesis](http://hypothesis.works/)                                                            | Data driven test framework       | [Quickcheck](https://github.com/BurntSushi/quickcheck) and [proptest](https://github.com/altsysrq/proptest)       |
| [mock](https://pypi.python.org/pypi/mock)                                                         | Test mocking                     | [Mockers](https://crates.io/crates/mockers)                                                                       |
| [bioPython](https://pypi.python.org/pypi/biopython)                                               | Bioinformathics libraries        | [Rust Bio](https://github.com/rust-bio)                                                                           |
| [Dynaconf](http://github.com/rochacbruno/dynaconf)                                                | Config management                | [Config](https://github.com/mehcode/config-rs)                                                                    |
| `itertools` *                                                                                     | Data structure iteration         | [Rust Itertools](https://github.com/bluss/rust-itertools)                                                         |
| [Geopython](https://pypi.python.org/pypi/geopython)                                               | Geo spatial data                 | [Geo Rust](https://github.com/georust)                                                                            |
| [ScikitLearn](https://pypi.python.org/pypi/scikit_learn)                                          | Machine learning                 | [rusty-machine](https://github.com/AtheMathmo/rusty-machine)                                                      |
| [mistune](https://pypi.python.org/pypi/mistune)                                                   | Markdown / Common Mark Parser    | [cmark](https://github.com/google/pulldown-cmark)                                                                 |
| [celery](https://pypi.python.org/pypi/celery)                                                     | Distributed computation          | [Antimony](https://github.com/antimonyproject/antimony)                                                           |
| [boto](https://pypi.python.org/pypi/boto)                                                         | AWS clients                      | [rusoto](https://github.com/rusoto/rusoto)                                                                        |
| [AstroPy](https://pypi.python.org/pypi/astropy)                                                   | Astronomy                        | [astro-rust](https://github.com/saurvs/astro-rust)                                                                |
| [Numpy](https://pypi.python.org/pypi/numpy)                                                       | Numeric                          | [Numeric](https://crates.io/crates/numeric)                                                                       |
 

## Applications

| Python                                          | Definition                                       | Rust                                                   |
| ----------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------ |
| [Pelican](https://pypi.python.org/pypi/pelican) | Static Site generator                            | [Cobalt](https://github.com/cobalt-org/cobalt.rs)      |
| [ansible](https://pypi.python.org/pypi/ansible) | Infra Orchestration                              | [realize](https://crates.io/crates/realize)            |
| [mkdocs](https://pypi.python.org/pypi/mkdocs)   | Generate documentation and e-books from Markdown | [mdBook](https://crates.io/crates/mdbook)              |
| [locust](https://pypi.python.org/pypi/locust)   | HTTP load test                                   | [drill](https://github.com/fcsonline/drill)            |
| [Nameko](https://pypi.python.org/pypi/nameko)   | Microservices Framework                          | [fractalide](https://github.com/fractalide/fractalide) |
| [Quokka CMS](http://quokkaproject.org)          | CMS                                              | [Nickel CMS](https://github.com/irony-rust/nickel-cms) |



## Useful crates

Add Pythonic features to Rust

| Python                            | Definition                                         | Rust                                             |
| --------------------------------- | -------------------------------------------------- | ------------------------------------------------ |
| `{'foo': "bar"}`                  | Syntax to create a dict / hashmap                  | [maplit](https://crates.io/crates/maplit)        |
| `__init__(self, value='default')` | Instance initialization (with some default values) | [derive_new](https://github.com/nrc/derive-new)  |
| itertools `*stdlib`               | Extra iterators methods                            | [itertools](https://crates.io/crates/itertools)  |
| `hashlib` *                       | Password Hashing                                   | [libpasta](https://github.com/libpasta/libpasta) |

## Show me The code

From **Python** to **Rust** by examples  

> You can  copy-paste and run the **Rust** examples in https://play.rust-lang.org/ and **Python** in https://repl.it/languages/python3 


### Creating a new project

Create a new project with basic files, entry points, module initializer, dependency and installation artifacts.

**Python**

```bash
$ mkdir {pyproject,pyproject/src}
$ touch {pyproject/src/{__init__.py,__main__.py,program.py},pyproject/{requirements.txt,setup.py}} 
$ echo "-e ." >> pyproject/requirements.txt
$ echo "from setuptools import setup" >> pyproject/setup.py
$ echo "setup(author=..., name=...)" >> pyproject/setup.py
```

**Rust**

```bash
$ cargo new my-rust-program
```

---

### Installing new libraries/crates

**Python**

```bash
$ pip install foo 
```


**Rust**

```bash
$ cargo install foo
```

---

### Running / Compiling

**Python**

```bash
$ python my_python_program.py 
```


**Rust**

```bash
$ cargo run
```

In Rust, there is a `--release` flag that allows for more compile time optimization to be done, but it will take longer to compile

```bash
$ cargo run --release
```

---

### Hello World

**Python**

```python
if __name__ == "__main__":
    print("Hello, World")
```

**Rust**

```rust
fn main() {
  println!("Hello, World");
}
```

---

### Types and Declarations

Create new objects, values on basic primitive types and also data structures.

**Python**

```python
age = 80
name = 'daffy'
weight = 62.3
loons = ['bugs', 'daffy', 'taz']
ages = {  # Ages for 2017
    'daffy': 80,
    'bugs': 79,
    'taz': 63,
}
```

**Rust**

```rust
use std::collections::HashMap;

fn main() {
    let age = 80;
    let name = "daffy";
    let weight = 62.3;
    let mut loons = vec!["bugs", "daffy", "taz"];

    let mut ages = HashMap::new();  // Ages for 2017
    ages.insert("daffy", 80);
    ages.insert("bugs", 79);
    ages.insert("taz", 63);
}

```
---

### Define a function

Defining a function that takes 2 integer arguments and returns its sum.

**Python**

```python
def add(a, b):
    """Adds a to b"""
    return a + b
```
**Python with typing annotations**

It looks more similar to Rust.

```python
def add(a: int, b: int) -> int:
    """Adds a to b"""
    return a + b
```

**Rust**

```rust
/// Adds a to b
fn add(a: i32, b: i32) -> i32 {
  a + b
}
```

---

### List/Slice

Creating a list, adding new elements, gettings its length, slicing by index, itarating using for loop and iterating with enumerator.

**Python**

```python
names = ['bugs', 'taz', 'tweety']
print(names[0])  # bugs
names.append('elmer')
print(len(names))  # 4
print(names[2:])  # ['tweety', 'elmer']

for name in names:
    print(name)

for i, name in enumerate(names):
    print('{} at {}'.format(name, i))
```

**Rust**

```rust
fn main() {
    let mut names = vec!["bugs", "taz", "tweety"];
    println!("{}", names[0]);  // bugs
    names.push("elmer");
    println!("{}", names.len());  // 4
    println!("{:?}", &names[2..]);  // ["tweety", "elmer"]

    for name in &names {
        println!("{}", name);
    }

    for (i, name) in names.iter().enumerate() {
        println!("{} at {}", i, name);
    }
}
```

**.step_by()** is the equivalent for python's range/xrange step parameter.

python:
```py
for i in range(0,10,2):
   print(i) # 0, 2, 4, 6, 8
```

rust:
```rust
for i in (0..10).step_by(2) {
    println!("{}", i);  // 0, 2, 4, 6, 8
}
```

---

### Dict/Map

Create new dictionaries (hash maps), adding new keys and values, changing values, getting by key, checking if a key is containing, etc.

**Python**

```python

# Creating a new dict and populating it
ages = {}
ages['daffy'] = 80
ages['bugs'] = 79
ages['taz'] = 63

# or doing the same using a for loop
ages = {}
for name, age in [("daffy", 80), ("bugs", 79), ("taz", 63)]:
    ages[name] = age

# or initializing from a list
ages = dict([("daffy", 80), ("bugs", 79), ("taz", 63)])

# or passing key values on creation
ages = {  # Ages for 2017
    'daffy': 80,
    'bugs': 79,
    'taz': 63,
}

ages['elmer'] = 80
print(ages['bugs'])  # 79
print('bugs' in ages)  # True

del ages['taz']

for name in ages:  # Keys
    print(name)

for name, age in ages.items():  # Keys & values
    print('{} is {} years old'.format(name, age))
```

**Rust**

```rust
use std::iter::FromIterator;
use std::collections::HashMap;

fn main() {

    // Creating a new HashMap and populating it
    let mut ages = HashMap::new();  // Ages for 2017
    ages.insert("daffy", 80);
    ages.insert("bugs", 79);
    ages.insert("taz", 63);

    // or doing the same using a loop
    let mut ages = HashMap::new();
    for &(name, age) in [("daffy", 80), ("bugs", 79), ("taz", 63)].iter() {
        // For non-Copy data, remove & and use iter().clone()
        ages.insert(name, age);
    }

    // or initializing from Array
    let mut ages: HashMap<&str, i32> =  // Ages for 2017
        [("daffy", 80), 
         ("bugs", 79), 
         ("taz", 63)]
        .iter().cloned().collect();

    // or initializing from Vec (Iterator)
    let mut ages: HashMap<&str, i32> =  // Ages for 2017
        HashMap::from_iter(
            vec![
               ("daffy", 80),
               ("bugs", 79),
               ("taz", 63)
            ]
        );

    ages.insert("elmer", 80);
    println!("{}", ages["bugs"]);  // 79
    println!("{}", ages.contains_key("bugs")); // true
    ages.remove("taz");


    for name in ages.keys() {  // Keys
      println!("{}", name);
    }

    for (name, age) in &ages {  // Keys & values
      println!("{} is {} years old", name, age);
    }

}
```

#### Pythonic alternative to dict/map in Rust

You can use the [maplit](https://crates.io/crates/maplit) crate to load `hashmap!` macro to have an efficient sugared (a.k.a Pythonic) syntax!

```toml
# Cargo.toml
[dependencies]
maplit = "*"
```

then

```rust
#[macro_use] extern crate maplit;

let map = hashmap!{
    "daffy" => 80,
    "bugs" => 79,
    "taz" => 63,
};
```

---

### set / HashSet

Create a `set` (a hash of unique keys), add new keys and compute `intersection`, `difference` and `union`

**Python**

```python

# creating and populating
colors = set()
colors.add("red")
colors.add("green")
colors.add("blue")
colors.add("blue")

# using literal syntax
colors = {'red', 'green', 'blue', 'blue'}

# from an iterator
colors = set(['red', 'green', 'blue', 'blue'])


# deduplication
print(colors)  # {"blue", "green", "red"}

# operations
colors = {'red', 'green', 'blue', 'blue'}
flag_colors = {"red", "black"}

# difference
colors.difference(flag_colors)  # {'blue', 'green'}

# symmetric difference
colors.symmetric_difference(flag_colors)  # {'black', 'blue', 'green'}

# intersection
colors.intersection(flag_colors)  # {'red'}

# union
colors.union(flag_colors)  # {'black', 'blue', 'green', 'red'}

```

**Rust**

```rust
use std::collections::HashSet;
use std::iter::FromIterator;

fn main() {

    // creating and populating - type inference
    let mut colors = HashSet::new();
    colors.insert("red");
    colors.insert("green");
    colors.insert("blue");
    colors.insert("blue");

    // from an iterator - explicit type
    let mut colors: HashSet<&str> = HashSet::from_iter(vec!["red", "green", "blue", "blue"]);

    // deduplication
    println!("{:?}", colors); // {"blue", "green", "red"}

    // Operations
    let mut colors: HashSet<&str> = HashSet::from_iter(vec!["red", "green", "blue", "blue"]);
    let mut flag_colors: HashSet<&str> = HashSet::from_iter(vec!["red", "black"]);

    // difference
    colors.difference(&flag_colors); // ["green", "blue"]

    // symmetric difference
    colors.symmetric_difference(&flag_colors); // ["blue", "green", "black"]

    // intersection
    colors.intersection(&flag_colors); // ["red"]

    // union
    colors.union(&flag_colors); // ["red", "blue", "green", "black"]
}
```

or syntax sugared using [maplit](https://crates.io/crates/maplit) crate

```rust
#[macro_use] extern crate maplit;

let colors = hashset!{"red", "green", "blue", "blue"};
```

---

### while and for loops

Looping until a condition is met or over an iterable object.

**Python**

```python
# While loop

counter = 0
while counter < 10:
    print(counter)
    counter += 1

# infinite while loop
while True:
    print("loop Forever!")

# infinite while loop with break
counter = 0
while True:
    print(counter)
    counter += 1
    if counter >= 10:
        break


# while loop with continue
counter = 0
while True:
    counter += 1
    if counter == 5:
        continue
    print(counter)
    if counter >= 10:
        break

# For loop over a list
for color in ["red", "green", "blue"]:
    print(color)

# Enumerating indexes
for  i, color in enumerate(["red", "green", "blue"]):
    print(f"{color} at index {i}")

# For in a range
for number in range(0, 100):
    print(number)  # from 0 to 99

```

**Rust**

```rust
fn main() {

    // While loop
    let mut counter = 0;
    while counter < 10 {
        println!("{}", counter);
        counter += 1;
    }

    // infinite while loop
    loop {
        println!("Loop forever!");
    }

    // infinite while loop with break
    let mut counter = 0;
    loop {
        println!("{}", counter);
        counter += 1;
        if counter >= 10 { break; }
    }

    // infinite while loop with continue
    let mut counter = 0;
    loop {
        counter += 1;
        if counter == 5 { continue; }
        println!("{}", counter);
        if counter >= 10 { break; }
    }

    // for loop over a list
    for color in ["red", "green", "blue"].iter() {
        println!("{}", color);
    }

    // Enumerating indexes
    for (i, color) in ["red", "green", "blue"].iter().enumerate() {
        println!("{} at index {}", color, i);
    }

    // for in a range
    for number in 0..100 {
        println!("{}", number);  // from 0 to 99
    }
}
```

#### Loop Labels

**Rust** has a looping feature which is not present on Python: **Loop labels**

```rust
'outer: for x in 0..10 {
    'inner: for y in 0..10 {
        if x % 2 == 0 { continue 'outer; } // continues the loop over x
        if y % 2 == 0 { continue 'inner; } // continues the loop over y
        println!("x: {}, y: {}", x, y);
    }
}
```

---

### Files

Read a text file and iterate its lines printing the content, properly close the file at the end.

**Python**

```python
from pathlib import Path

with Path("/tmp/song.txt").open() as fp:
    #  Iterate over lines
    for line in fp:
        print(line.strip())
```

**Rust**

```rust
use std::io::{BufReader, BufRead};
use std::fs::File;
use std::path::Path;


fn main () {
    let fp = File::open(Path::new("/tmp/song.txt")).unwrap();
    let file = BufReader::new(&fp);
    for line in file.lines() {
        //  Iterate over lines
        println!("{}", line.unwrap());
    }
}

```

---

### Exceptions/Return Error

Expecting for exceptions and identifying errors.

**Python**

```python
def div(a, b):
    if b == 0:
        raise ValueError("b can't be 0")
    return a / b

# ...

try:
    div(1, 0)
except ValueError:
    print('An error occurred!')
```

**Rust**

```rust
fn div(a: f64, b: f64) -> Result<f64, &'static str> {
    if b == 0 {
        Err("b can't be 0")
    } else {
        Ok(a / b)
    }
}

fn main() {
    match div(1, 0) {
        Ok(_) => {},
        Err(_) => println!("An error occurred!"),
    };
}
```

---

### Concurrency

**Python**

```python
thr = Thread(target=add, args=(1, 2), daemon=True)
thr.start()
```

**Rust**

```rust
use std::thread;

thread::spawn(|| {
        add(5,5);
    });

```

---

### Communicating between threads

Managing data context between threads.

**Python**

```python
from queue import Queue
queue = Queue()
# ...
# Send message from a thread
queue.put(353)


# ...
# Get message to a thread
val = queue.get()
```

**Rust**

```rust
use std::thread;
use std::sync::mpsc;

fn main() {
    let (tx, rx) = mpsc::channel();

    let sender = thread::spawn(move || {
        let val = String::from("hi");
        tx.send(val.clone()).unwrap();
        println!("Sent {}", val);
    });

    let receiver = thread::spawn(move || {
        let received = rx.recv().unwrap();
        println!("Received: {}", received);
    });

    sender.join();
    receiver.join();
}
```

---

### Sorting

Sorting lists, reversing and using a key.

**Python**

```python
names = ['taz', 'bugs', 'daffy']

# Lexicographical order
names.sort()

# Reversed lexicographical order
names.sort(reverse=True)

# Sort by length
names.sort(key=len)
```

**Rust**

```rust
fn main() {
    let mut names = ["taz", "bugs", "daffy"];

    // Lexicographical order
    names.sort();

    // Reversed lexicographical order
    names.sort_by(|a, b| b.cmp(a));

    // Sort by length
    names.sort_by_key(|a| a.len());
}
```

---

### Web app with Flask / Rocket

**Python**

```python
from flask import Flask

app = Flask(__name__)


@app.route('/')
def index():
    return 'Hello Python'


if __name__ == '__main__':
    app.run(port=8080)
```

**Rust**

```rust
#![feature(plugin)]
#![plugin(rocket_codegen)]

extern crate rocket;

#[get("/")]
fn index() -> &'static str {
    "Hello Rust"
}

fn main() {
    rocket::ignite().mount("/", routes![index]).launch();
}
```

---

### HTTP Request with error handling

**Python**

Using [**requests**](http://pypi.org/project/requests)

```python
import requests

url = 'https://httpbin.org/ip'

try:
    resp = requests.get(url)
except HTTPError as err:
    msg = f"error: cannot get {url} - {err}"
    raise SystemExit(msg)

assert resp.status_code == 200

print(f"The response content is: {resp.content}")

```

**Rust**

using [**reqwest**](https://crates.io/crates/reqwest)

```rust
extern crate reqwest;
use std::io::Read;

fn main() {
    let url = "https://httpbin.org/ip";

    let mut resp = match reqwest::get(url) {
        Ok(response) => response,
        Err(e) => panic!("error: could not perform get request {}", e),
    };

    assert!(resp.status().is_success());

    let mut content = String::new();
    resp.read_to_string(&mut content).expect("valid UTF-8");

    println!("The response content is: {}", content);
}
```

---

### Multithreaded HTTP Crawler

**Python**

Using [**requests**](http://pypi.org/project/requests)

```python
from concurrent.futures import ThreadPoolExecutor
import requests


URLS = (
    "https://httpbin.org/html",
    "https://httpbin.org/links/10/0",
    "https://httpbin.org/robots.txt",
    "https://httpbin.org/user-agent",
    "https://httpbin.org/links/10/0",
    "https://httpbin.org/robots.txt",
    "https://httpbin.org/xml",
    "https://httpbin.org/redirect/1",
    "https://httpbin.org/redirect/2",
    "https://httpbin.org/cookies",
    "https://httpbin.org/basic-auth/user/passwd",
    "https://httpbin.org/gzip",
)


def crawl_worker(url):
    try:
        print(f"Response of url: {url} is {requests.get(url).status_code}")
    except Exception:
        print("Failed to get url.")


if __name__ == "__main__":
    with ThreadPoolExecutor() as executor:
        executor.map(crawl_worker, URLS)
```

**Rust**

using [**reqwest**](https://crates.io/crates/reqwest)

```rust
extern crate reqwest;
use std::thread;


fn crawl_worker(url: &str) {
    let parsed_url = reqwest::Url::parse(url).expect("Bad url format.");
    let response = reqwest::get(parsed_url).expect("Failed to get url.");
    println!("Response of url: {} is {:?}", url, response.status().to_string());
}


fn main() {
    let urls = vec![
        "https://httpbin.org/html",
        "https://httpbin.org/links/10/0",
        "https://httpbin.org/robots.txt",
        "https://httpbin.org/user-agent",
        "https://httpbin.org/links/10/0",
        "https://httpbin.org/robots.txt",
        "https://httpbin.org/xml",
        "https://httpbin.org/redirect/1",
        "https://httpbin.org/redirect/2",
        "https://httpbin.org/cookies",
        "https://httpbin.org/basic-auth/user/passwd",
        "https://httpbin.org/gzip",
    ];
    let mut queue = vec![];

    for url in urls {
        queue.push(thread::spawn(move || {
            crawl_worker(url);
        }));
    }

    for job in queue {
        let _ = job.join();
    }
}
```

---

### Encode and Decode JSON

**Python**

```python
import json

# Decode/Deserialize
data = '''{
    "name": "bugs",
    "age": 76
}'''

person = json.loads(data)

# Do things like with any other Python data structure
print(f"{person['name']} was born {person['age']} years ago")

# Encode/Serialize
serialized = json.dumps(obj)
print(f"The serialized value is: {serialized}")
```

**Rust**

```rust
extern crate serde;
extern crate serde_json;

#[macro_use]
extern crate serde_derive;

#[derive(Serialize, Deserialize)]
struct Person {
    name: String,
    age: u8,
}

fn main() {
    // Decode/Deserialize
    let data = r#"{"name": "bugs", "age": 76}"#;

    let p: Person = match serde_json::from_str(data) {
        Ok(person) => person,
        Err(e) => panic!("error: could not deserialize: {}", e),
    };

    // Do things just like with any other Rust data structure.
    println!("{} was born {} years ago.", p.name, p.age);

    // Encode/Serialize
    let serialized = serde_json::to_string(&p).unwrap();
    println!("The serialized value is: {}", serialized);
}

```

---

### Object Orientation

**Python**

[playground](https://repl.it/repls/SourPaltryHorseshoecrab)

```python
class Cat:
    def __init__(self, name):
        self.name = name

    def greet(self, other):
        print("Meow {}, I'm {}".format(other, self.name))

# ...

grumy = Cat('Grumpy')
grumy.greet('Garfield')  # Meow Garfield, I'm Grumpy
```

**Rust**

[playground](https://play.rust-lang.org/?gist=155c76fae5240e483858000e73e82f00&version=stable)

```rust
struct Cat {
    name: String
}

impl Cat {

    pub fn new<S>(name: S) -> Cat where S: Into<String> {
        Cat { name: name.into() }
    }
    
    pub fn greet<S: Into<String>>(&self, other:S) {
        println!("Meow {}, I'm {}", other.into(), self.name);
    }     
    
}

fn main() {
    let grumpy = Cat::new("Grumpy");
    grumpy.greet("Garfield");  // Meow Garfield, I'm Grumpy
}
```

> NOTE: In Rust, it is best to avoid `stringly types APIs` so in the above example it would be better if we do `let garfield = Cat::new("Garfield")` and then make `greet` to accept an instance of `Cat` as `other` argument. If you are interested [watch this](https://www.youtube.com/watch?v=0zOg8_B71gE).


---

### Print Object for Debug/Log 

Print formatted object debug information

**Python**

```python

class Actor:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __repr__(self):
      return str(self.__dict__)

daffy = Actor(
    name='Daffy',
    age=80,
)

print('{!r}'.format(daffy))  # {'name': 'Daffy', 'age': 80}
```

**Rust**

```rust
#[derive(Debug)]
struct Actor {
    name: String,
    age: i32
}

fn main() {
    let daffy = Actor {name: "Daffy".into(), age: 80};
    println!("{:#?}", daffy);   // Actor {name: "Daffy", age: 80 }
}

```

---


### Template for new examples

Explanation comes here.

**Python**

[playground](https://repl.it/repls/uniquelinkhere)

```python
# python code goes here
```

**Rust**

[playground](https://play.rust-lang.org/?gist=uniquehashhere&version=stable)

```rust
// rust code goes here
```

---

## Credits

Created by [Bruno Rocha](http://about.me/rochacbruno) [@rochacbruno](http://github.com/rochacbruno) inspired by https://www.353.solutions/py2go/index.html

First published in [BrunoRocha.org](http://brunorocha.org/python/py2rs-from-python-to-rust-reference-guide.html)

Send a Pull Request or Suggestion as a new issue.

---

![toasting-at-cargo-hall](https://user-images.githubusercontent.com/458654/33390506-35c4d43c-d51d-11e7-9591-f21c6b0770f6.png)

## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
| [<img src="https://avatars2.githubusercontent.com/u/458654?v=4" width="100px;"/><br /><sub>Bruno Rocha</sub>](http://brunorocha.org)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=rochacbruno "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=rochacbruno "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/15098580?v=4" width="100px;"/><br /><sub>Shing Tak Lam</sub>](http://shingtaklam1324.github.io)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=shingtaklam1324 "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=shingtaklam1324 "Documentation") | [<img src="https://avatars3.githubusercontent.com/u/8337409?v=4" width="100px;"/><br /><sub>Deri Herdianto</sub>](https://twitter.com/deikatsuo)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=deikatsuo "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=deikatsuo "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/1634529?v=4" width="100px;"/><br /><sub>Tiago Guimarães</sub>](https://github.com/tilacog)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=tilacog "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=tilacog "Documentation")     | [<img src="https://avatars0.githubusercontent.com/u/747996?v=4" width="100px;"/><br /><sub>Imblc</sub>](https://github.com/imbolc)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=imbolc "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=imbolc "Documentation")           | [<img src="https://avatars0.githubusercontent.com/u/6840312?v=4" width="100px;"/><br /><sub>Joshua Schmid</sub>](https://github.com/jschmid1)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=jschmid1 "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=jschmid1 "Documentation") | [<img src="https://avatars0.githubusercontent.com/u/6236892?v=4" width="100px;"/><br /><sub>Mikołaj Wawrzyniak</sub>](http://spejss.com/)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=spejss "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=spejss "Documentation") |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| [<img src="https://avatars0.githubusercontent.com/u/4040623?v=4" width="100px;"/><br /><sub>Marcello Seri</sub>](http://mseri.me)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=mseri "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=mseri "Documentation")                | [<img src="https://avatars0.githubusercontent.com/u/6267772?v=4" width="100px;"/><br /><sub>Twentysix</sub>](https://github.com/Twentysix26)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=Twentysix26 "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=Twentysix26 "Documentation")                | [<img src="https://avatars1.githubusercontent.com/u/4687791?v=4" width="100px;"/><br /><sub>Ivan Tham</sub>](http://pickfire.tk)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=pickfire "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=pickfire "Documentation")                   | [<img src="https://avatars3.githubusercontent.com/u/20056?v=4" width="100px;"/><br /><sub>Romain Hardouin</sub>](https://github.com/rhardouin)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=rhardouin "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=rhardouin "Documentation") | [<img src="https://avatars1.githubusercontent.com/u/239012?v=4" width="100px;"/><br /><sub>Luca Barbato</sub>](https://github.com/lu-zero)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=lu-zero "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=lu-zero "Documentation") | [<img src="https://avatars2.githubusercontent.com/u/6642?v=4" width="100px;"/><br /><sub>Luiz Irber</sub>](http://luizirber.org)<br />[💻](https://github.com/rochacbruno/py2rs/commits?author=luizirber "Code") [📖](https://github.com/rochacbruno/py2rs/commits?author=luizirber "Documentation")            | [<img src="https://avatars0.githubusercontent.com/u/7190293?v=4" width="100px;"/><br /><sub>bobogei81123</sub>](https://github.com/bobogei81123)<br />[📖](https://github.com/rochacbruno/py2rs/commits?author=bobogei81123 "Documentation")                                                            |
| [<img src="https://avatars3.githubusercontent.com/u/207168?v=4" width="100px;"/><br /><sub>Diogo Baeder</sub>](http://diogobaeder.com.br)<br />[📖](https://github.com/rochacbruno/py2rs/commits?author=diogobaeder "Documentation")                                                                         | [<img src="https://avatars0.githubusercontent.com/u/1664?v=4" width="100px;"/><br /><sub>Sven-Hendrik Haase</sub>](http://pseudoform.org)<br />[📖](https://github.com/rochacbruno/py2rs/commits?author=svenstaro "Documentation")                                                                                                  |
<!-- ALL-CONTRIBUTORS-LIST:END -->
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --><!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
