How to install Conda on Linux/OSX for python
Conda is a package management system that is popular in the machine learning and python space.
Table of contents
- Using pip with conda
- Email libraries in python
- Installing
- Usage
Conda is a package management tool that can install code to your machine for development with python.
Using pip with conda
To add interoperability with pip you can enable conda config for this:
conda config --set pip_interop_enabled True
Email libraries in python
MailSlurp is an email library for sending and receiving emails in Python. Create disposable fake email accounts for testing and development.
Installing
You can install the email client with pip in conjunction with conda.
pip install mailslurp-client
Usage
To configure a client and create an email address use the follow example:
import mailslurp_client
configuration = mailslurp_client.Configuration()
configuration.api_key['x-api-key'] = "your-api-key-here"
def create_inbox_example():
with mailslurp_client.ApiClient(configuration) as api_client:
# create an inbox using the inbox controller
api_instance = mailslurp_client.InboxControllerApi(api_client)
inbox = api_instance.create_inbox()
# check the id and email_address of the inbox
assert len(inbox.id) > 0
assert "mailslurp.com" in inbox.email_address