Coder Social home page Coder Social logo

python-p3-email-parser-lab's Introduction

Email Parser Lab

Learning Goals

  • Validate that strings match specific patterns using regular expressions.
  • Search for strings that match specific patterns using regular expressions.

Key Vocab

  • Class: a bundle of data and functionality. Can be copied and modified to accomplish a wide variety of programming tasks.
  • Object: the more common name for an instance. The two can usually be used interchangeably.
  • Object-Oriented Programming: programming that is oriented around data (made mobile and changeable in objects) rather than functionality. Python is an object-oriented programming language.
  • Function: a series of steps that create, transform, and move data.
  • Method: a function that is defined inside of a class.

Instructions

This is a test-driven lab. Run pipenv install to create your virtual environment and pipenv shell to enter the virtual environment. Then run pytest -x to run your tests. Use these instructions and pytest's error messages to complete your work in the lib/ folder.

You will write a program that, given a string of email addresses, parses that string into an array.

Your class, EmailAddressParser, should take the string of addresses on initialization. Instances should respond to a parse() instance method that parses the string into individual email addresses and returns them in an array.

Your class should be able to do this:

email_addresses = "[email protected], [email protected]"
parser = EmailAddressParser(email_addresses)

parser.parse()
# => ["[email protected]", "[email protected]"]

Note: Your EmailAddressParser class should handle a list of email addresses that are separated by either spaces or comma-separated values (CSVs):

Additionally, the parse() method should only return unique addresses, sorted alphabetically.

Write your solution in lib/email_address_parser.py.

Once all of your tests are passing, commit and push your work using git to submit.

Hints: in order to get this lab passing, you will need to do some research into the following topics:


Resources

python-p3-email-parser-lab's People

Contributors

professor-ben avatar kev065 avatar lizbur10 avatar jlboba avatar lberge17 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.