Git Product home page Git Product logo

user_rest_client's Introduction

User REST Client

This Python package is designed to interact with the REST API provided by https://reqres.in to fetch and display user data in a paginated format. The package consists of a simple command-line interface that allows users to specify the number of items per page and the page number they wish to view.

The application should look like the below, after installing and executing dependencies.

Alt text

Structure

The package includes the following files:

  • __init__.py: The initialization script for this package.
  • main.py: The main executable script that provides the CLI.
  • user_client.py: Contains the UserClient class responsible for API interactions.
  • user_dto.py: Contains the UserDTO class that defines the user data structure.
  • requirements.txt: Lists all the Python package dependencies for this project.

The __pycache__ directory contains compiled Python files that should not be edited directly.

Installation

Before running the script, ensure you have Python >= 3.10 installed on your system and install the required dependencies by running:

pip install -r requirements.txt

Usage

Execute the main.py script to start the application:

python main.py

Follow the on-screen prompts to input the desired page number and the number of users to display per page.

Features

  • Interactive CLI prompts for user input.
  • Colorful, formatted output in the terminal for easy reading.
  • Error handling with descriptive messages.
  • Pagination support with meta information display.

Contributing

Feel free to fork the repository, make changes, and submit a pull request if you have improvements or bug fixes.

user_rest_client's People

Contributors

zedatrix 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.