Giter Site home page Giter Site logo

sammdu / zendesk-interview-2022 Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 226 KB

Take-home technical project for Zendesk 2022 summer internship

License: MIT License

Python 71.07% CSS 12.51% HTML 11.37% JavaScript 5.05%
python python3 flask jinja2 zendesk zendesk-api

zendesk-interview-2022's Introduction

Zendesk-Interview-2022

Take-home technical project for Zendesk 2022 summer internship.

  • Connect to the Zendesk API
  • Request all the tickets for your account
  • Display them in a list
  • Display individual ticket details
  • Page through tickets when more than 25 are returned

Developed using Python, Flask, HTML, CSS, JavaScript, and displays a web-based user interface.

Screenshot_1 Screenshot_2

Prerequisites

Python

Please use Python3.9.

Packages

The following Python packages are used for this project:

Flask==2.0.2
Jinja2==3.0.3
mypy==0.910
mypy-extensions==0.4.3
pytest==6.2.5
requests==2.26.0
requests-mock==1.9.3
types-Flask==1.1.5
types-Jinja2==2.11.8
types-requests==2.26.1
typing-extensions==4.0.0

They are also found in requirements.txt.

Setup Instructions

1. Create a Python virtual environment

python3.9 -m venv zendesk_test_env

Enter the newly created Python virtual environment folder:

cd zendesk_test_env

2. Setup the project environment

Clone the project repository from GitHub:

git clone https://github.com/sammdu/Zendesk-Interview-2022.git

Enter the project repository folder:

cd Zendesk-Interview-2022

Activate the Python virtual environment in your terminal:

source ../bin/activate

After the previous step, you should see the following prompt prepended to your command prompt: (zendesk_test_env), which should be consistent with the Python virtual environment folder name.

Install required Python packages with pip:

pip install -r requirements.txt

3. Environment variables

Some important configuration parameters are sensitive in nature, therefore not included in the project repository. They need to be supplied via system environment variables. There are three required environment variables that need to be provided before is is possible to run or test the project:

  • ZENDESK_API_SUBDOMAIN: subdomain that is prepended to zendesk.com, chosen upon Zendesk account setup
    • For example, if your Zendesk Dashboard is accessed at https://zccuser.zendesk.com/agent/dashboard, then your subdomain should be zccuser
  • ZENDESK_API_EMAIL: email of the user associated with the Zendesk account
  • ZENDESK_API_TOEKEN: HTTP Basic Authentication API token generated at the Zendesk Admin Center

Sample configuration:

ZENDESK_API_SUBDOMAIN="zccuser"
ZENDESK_API_EMAIL="[email protected]"
ZENDESK_API_TOEKEN="6wiIBWbGkBMo1mRDMuVwkw1EPsNkeUj95PIz2akv"

These environment variables are required before running or testing is possible!

Seeing the project in action

With an activated virtual environment in the project repository, simply execute the following command to start a Flask development server:

python3.9 ./run.py

This will start a server at http://127.0.0.1:5000/. Visit this address in your browser to see the project in action.

Testing

1. Testing for type violations with mypy

In the project repository root, where the mypy.ini file is located, simply execute the following command to test for type violations:

mypy

2. Unit tests with pytest

In the project repository root, where the test.py file is located, simply execute the following command to run all unit tests within the test/ folder:

python3.9 ./test.py

zendesk-interview-2022's People

Contributors

sammdu avatar

Watchers

 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.