python-rest-api-comcast
Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: sunil-nalamari
- Language: Python
- Default Branch: main
- Size: 5.86 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Comcast DevX Coding Interview
Through this exercise we wish to assess a candidates ability to execute on some of the more common types of tasks we see on a daily basis. This exercise includes web services, string/collection manipulation, with a lead into design decisions for conversation during the interview.
Your job is to get the app running, implement some features, and send us your implementation.
Getting Started
To get you off to the right start we've provided an initial implementation of a basic rest service. It provides an initial implementation of the /, /stringinate and /stats endpoints. This implementation is available in 3 different languages:
Each contains some instructions for requirements and how to get started in that environment.
Guidelines
We don't want to restrict your language choice here. If your most productive language is NodeJs, Rust, etc. feel free to port the starting service over to the rest framework of your choice.
Feel free to Google for things when you have questions. We'd love some insight into your research process so please capture references (URLs) to sites you find helpful in solving these tasks. Especially if you are tackling the tasks in a language with which you are not the most familiar. References should be collected in the CITATIONS.md file.
It's not expected that this exercise take more than an hour or two. That being said, if you use a language/framework combination other than those provided it could run over that time. We've provided a NOTES.md file for you to document any decisions taken or things you'd like to communicate about you solutions.
This is a git project. We prefer many small commits over one large commit. It helps us understand your progression towards completion as well as giving us smaller increments to review.
Submit
When you are done with the exercise, please send us:
- A zip of your project with preserved git files, which includes:
- Required features
- 1 Developer Choice feature
- Citations
- Decision document
Important Note: While compressing the files and folders for sharing your solution with us, please remove all the dependencies (say jar files under target directory, vendor modules etc.) downloaded while building the application. This is to avoid any increase the size of the zip file for hassle free transfer and/or possible security filters from blocking the zip file for sharing.
The API
The application supports a small set of API endpoints that can be used to get information about and manipulate string values. The application also tracks statistics about all the strings that have been sent to the server.
/
The root of the server, displays info about the other endpoints. This is the only endpoint that does not return JSON.
/stringinate
Get all of the info you've ever wanted about a string. Accepts GET and POST requests. For POSTs the endpoint takes JSON of the following form:
{"input":"your-string-goes-here"}
For GETs an input string is specified as ?input=<your-input>.
/stats
Get statistics about all strings the server has seen, including the number of times each input has been received along with the longest and most popular strings etc.
Features for You to Implement
Now that you have a running server it's time to add some features and make some changes to the application.
There are a few features that need to be added to the user-facing API:
- For the
/stringinateendpoint, for a given input string we need to find the character that occurs most frequently and add that character, along with its number of occurrences to the API response JSON. You decide how to represent this in the JSON response. Ignore white space and punctuation. - For the
statsendpoint, track which string input has been seen the most times. Return this value as themost_popularkey in the response JSON. - For the
statsendpoint, track which string input is the longest string to be seen by the server and return as thelongest_input_receivedkey in the response JSON.
Developer's Choice
It's your turn to add a feature or make other changes to improve the application. Implement one new feature idea or change that makes the code better.
Some things you might consider:
- Could there be improvements to logging that might help with troubleshooting problems?
- Are there any input/output validations that might be helpful?
- Would the application benefit from unit or functional tests?
- Are there other interesting string manipulations or stats to implement? Longest palindrome? Anagram finder? Is a given string a dictionary word? The possibilities are virtually endless!
- Could any caching be added to reduce computation for a given input string?
- Could the code be refactored for better maintainability, understandability, extensibilty, etc?
- Could statistics be optionally stored outside of the app so that they can persist across server restarts?
- Would rate limiting to 5rps from a given IP be a useful tool for mitigating excess traffic to the server?
Owner
- Name: Sunil Nalamari
- Login: sunil-nalamari
- Kind: user
- Location: Mount Laurel , NJ
- Repositories: 1
- Profile: https://github.com/sunil-nalamari
Citation (CITATIONS.md)
Please enumerate the references you used in a list here: - [Google](http://www.google.com) - -
GitHub Events
Total
Last Year
Dependencies
- Flask ==1.1.2
- Jinja2 ==2.11.3
- MarkupSafe ==1.1.1
- Werkzeug ==1.0.1
- click ==7.1.2
- itsdangerous ==1.1.0