Git Product home page Git Product logo

airbnb_clone's Introduction

AirBnB Clone - The Console

Welcome to the AirBnB clone project! This project is the first step in building a full web application for managing an AirBnB-like platform. In this step, we develop a command interpreter to manage AirBnB objects and set the foundation for future steps involving web development, database storage, API integration, and more.

Project Overview

The goal of this project is to build a command interpreter in Python to manage objects related to the AirBnB platform. The interpreter allows you to:

  • Create new objects (e.g., User, Place, State, City, etc.)
  • Retrieve objects from a file
  • Update attributes of an object
  • Destroy objects
  • Perform operations on objects (counting, computing statistics, etc.)

This interpreter will be crucial for further development of the AirBnB clone project, as it will interface with different components like HTML/CSS templates, databases, and APIs.

Requirements

  • Python Scripts

    • All files must be written in Python 3 and run on Ubuntu 20.04 LTS using Python 3.8.5.
    • Use pycodestyle (version 2.8.*) for code style checks.
    • All files must end with a new line.
    • The first line of each file must be #!/usr/bin/python3.
    • All files must be executable.
    • Each module, class, and function should have detailed documentation.
  • Python Unit Tests

    • Tests should be created using the unittest module.
    • All test files should be in a tests folder and use a naming convention starting with test_.
    • Test files should reflect the same structure as the project source code.
    • All tests should be executed using python3 -m unittest discover tests.

Resources

Here are some useful resources to help with this project:

Learning Objectives

By completing this project, you should understand:

  • How to create a Python package.
  • How to create a command interpreter in Python using the cmd module.
  • What is Unit testing and how to implement it in a large project.
  • How to serialize and deserialize a class in Python.
  • How to read and write JSON files.
  • How to manage datetime.
  • What is a UUID.
  • How to use *args and **kwargs.
  • How to handle named arguments in a function.

Execution

The command interpreter should work in both interactive and non-interactive modes.

Interactive Mode

$ ./console.py
(hbnb) help

Documented commands (type help <topic>):
========================================
EOF  help  quit

(hbnb) quit
$


Based on the provided instructions and requirements, here's a suggested content for the README file. It contains sections to guide you through the project's purpose, requirements, setup, and key elements. Important concepts and resources are linked to relevant external sources for additional context.

README.md
markdown
Copy code
# AirBnB Clone - The Console

Welcome to the AirBnB clone project! This project is the first step in building a full web application for managing an AirBnB-like platform. In this step, we develop a command interpreter to manage AirBnB objects and set the foundation for future steps involving web development, database storage, API integration, and more.

## Project Overview
The goal of this project is to build a command interpreter in Python to manage objects related to the AirBnB platform. The interpreter allows you to:
- Create new objects (e.g., User, Place, State, City, etc.)
- Retrieve objects from a file
- Update attributes of an object
- Destroy objects
- Perform operations on objects (counting, computing statistics, etc.)

This interpreter will be crucial for further development of the AirBnB clone project, as it will interface with different components like HTML/CSS templates, databases, and APIs.

## Requirements
- Python Scripts
  - All files must be written in Python 3 and run on Ubuntu 20.04 LTS using Python 3.8.5.
  - Use `pycodestyle` (version 2.8.*) for code style checks.
  - All files must end with a new line.
  - The first line of each file must be `#!/usr/bin/python3`.
  - All files must be executable.
  - Each module, class, and function should have detailed documentation.

- Python Unit Tests
  - Tests should be created using the `unittest` module.
  - All test files should be in a `tests` folder and use a naming convention starting with `test_`.
  - Test files should reflect the same structure as the project source code.
  - All tests should be executed using `python3 -m unittest discover tests`.

## Resources
Here are some useful resources to help with this project:
- [Python packages](https://docs.python.org/3/tutorial/modules.html#packages)
- [AirBnB clone concept](https://www.airbnb.com/)
- [cmd module](https://docs.python.org/3/library/cmd.html)
- [UUID module](https://docs.python.org/3/library/uuid.html)
- [datetime module](https://docs.python.org/3/library/datetime.html)
- [unittest module](https://docs.python.org/3/library/unittest.html)

## Learning Objectives
By completing this project, you should understand:
- How to create a Python package.
- How to create a command interpreter in Python using the `cmd` module.
- What is Unit testing and how to implement it in a large project.
- How to serialize and deserialize a class in Python.
- How to read and write JSON files.
- How to manage `datetime`.
- What is a UUID.
- How to use `*args` and `**kwargs`.
- How to handle named arguments in a function.

## Execution
The command interpreter should work in both interactive and non-interactive modes.

### Interactive Mode
```shell
$ ./console.py
(hbnb) help

Documented commands (type help <topic>):
========================================
EOF  help  quit

(hbnb) quit
$

### Non-Interactive Mode

```shell
Copy code
$ echo "help" | ./console.py
(hbnb)

Documented commands (type help <topic>):
========================================
EOF  help  quit

This functionality should allow you to run the interpreter in different contexts, including automated tests or other shell scripts.

airbnb_clone's People

Contributors

kakandemanwell avatar

Watchers

Kostas Georgiou avatar  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.