Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/idsulik/fakerapi

FakerApi provides dynamic json rest api with dynamic fields/values. Uses https://github.com/joke2k/faker/tree/master
https://github.com/idsulik/fakerapi

dummy-api faker faker-api python

Last synced: 9 days ago
JSON representation

FakerApi provides dynamic json rest api with dynamic fields/values. Uses https://github.com/joke2k/faker/tree/master

Awesome Lists containing this project

README

        

# FastAPI Faker Server
This is a FastAPI based server that generates fake data using the Faker library. This server can be used to quickly generate mock data for testing or development purposes.

# Examples
- [/users?fields=name,address,email,first_name](https://fakerapi-awurkxxgka-uc.a.run.app/users?fields=name,address,email,first_name)
- [/posts?fields=uuid4,image_url,sentence,text,date&locale=ru_RU](https://fakerapi-awurkxxgka-uc.a.run.app/posts?fields=uuid4,image_url,sentence,text,date&locale=ru_RU)
- [/comments?fields=user_name,text,first_name](https://fakerapi-awurkxxgka-uc.a.run.app/comments?fields=user_name,text,first_name)

# Features
- Get a list of available fields that can be used to generate data.
- Generate data with custom fields and in different locales.
- Limit the number of data entries to be generated.
# Endpoints
- `/available_field`s: Returns a list of fields available for data generation.
- `/{any}`: Returns fake data entries. You can specify the locale, limit the number of entries, and optionally provide specific fields.
# Quick Start
1. Clone this repository.
2. Install the requirements: pip install -r requirements.txt
3. Run the server: python main.py
4. Visit http://localhost:8000/docs for the interactive API documentation.

# Contributing
Contributions are welcome! Please open an issue if you find a bug or wish to propose a feature. Pull requests are also appreciated.

# License
MIT