Mimesis Simple HTTP Server
See original GitHub issueImplement very simple http server like in module http.server, which returns generated data by mimesis.
The idea is to pass template in header, and ignore body and query arguments, for future integration with another server.
For example:
Template:
{
"id": ":uuid",
"version": "0.1.2",
"owner.full_name": ":name :personal.surname",
"owner.email": {"_type": "str", "_field": ":email", "_key": "lower"},
"owner.phones": {"_type": "list", "_count": 5, "_field": [":telephone", "other1", "other2"]}
}
Output:
{
"id": "dfcfd2f3-0799-b519-1a94-326c978b10c6",
"version": "0.1.2",
"owner": {
"full_name": "Charley Parker",
"email": "cheetah1869@yandex.com",
"phones": ["776.907.0588", "717.592.4382", "168.028.7210", "other1", "other2"]
}
}
Or we can implement something like jinja2 templating system for open customize output
Some header examples:
- Mimesis-Template - Template for response
- Mimesis-Count - Count of outputs. Default: 0
- 0 - Response contain object.
- 1-99 - Response contain array of objects.
- Mimesis-Locale - Response locale. Default: en
It’s may be helpful for prototyping some RESTful/GRAPHql api.
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (17 by maintainers)
Top Results From Across the Web
Mimesis - Simple Test Server in 10 lines - gists · GitHub
Mimesis - Simple Test Server in 10 lines. GitHub Gist: instantly share code, notes, and snippets.
Read more >A System's Approach to Data Privacy on Public Cloud - USENIX
Abstract. Users are increasingly storing, accessing, and ex- changing data through public cloud services such as those provided by Google, ...
Read more >Mimesis Aegis: A Mimicry Privacy Shield - College of Computing
unintended data access, and 4) data servers can be com- ... Basic Reference Model: The Basic Model. http://www.ecma-.
Read more >Simple HTTP Server - Apps on Google Play
An application that will allow you to run a small local http server with static content. You can select any folder and it...
Read more >AEmulatio, Imitatio and Mimesis in Tertiary Education
Emulation, imitation and mimicry are fundamental processes by which all children, adolescents and adults learn new skills,.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We should not want to reject proposals simply without justifying them. Therefore, if you will allow me, I will express my opinion. That’s looks really useful and i like it, but we should keep in mind that Mimesis is library for generating data. We have added special section related to subject to documentation: What Mimesis is, What Mimesis is Not.
Let’s create it in another repository. In this repository we will concentrate on improving the existing functional and data.
@duckyou @sobolevn If you agree with me, let’s close this issue.
For
mimesis http serveri created one fileserver.pywith 200+ lines of code. This is'very'*100simple feature without complicated design. Its likehttp.serverbut for mimesis.Also about
mimesis-clod. Here’s an idea. What if we write not just data provider service, but something like proxy. I can explain in more detail in themimesis-labif you want it.