Console to handle object storage using JSON serialization and deserealization.

Overview

0x00. AirBnB clone - The console

Release date: Nov-15-2021

Twitter

AirBnB Custom banner

0x00.Table of contents

0x01 Introduction

Team project to build a clone of AirBnB.

The console is a command interpreter to manage objects abstraction between objects and how they are stored

BaseModel

0x02 Environment

Suite CRM terminal python HTML5 CSS3 Suite CRM Suite CRM Suite CRM git distributed version control system Github

All the development and testing was runned over an operating system Ubuntu 20.04 LTS using programming language Python 3.8.3. The editors used were VIM 8.1.2269, VSCode 1.6.1 and Atom 1.58.0 . Control version using Git 2.25.1.

0x03 Installation

git clone https://github.com/ralexrivero/AirBnB_clone.git

change to the AirBnb directory and run the command:

./console.py

Execution

In interactive mode

$ ./console.py
(hbnb) help

Documented commands (type help 
   
    ):
========================================
EOF  help  quit

(hbnb) 
(hbnb) 
(hbnb) quit
$

   

in Non-interactive mode

): ======================================== EOF help quit (hbnb) $ $ cat test_help help $ $ cat test_help | ./console.py (hbnb) Documented commands (type help ): ======================================== EOF help quit (hbnb) $ ">
$ echo "help" | ./console.py
(hbnb)

Documented commands (type help 
    
     ):
========================================
EOF  help  quit
(hbnb) 
$
$ cat test_help
help
$
$ cat test_help | ./console.py
(hbnb)

Documented commands (type help 
     
      ):
========================================
EOF  help  quit
(hbnb) 
$

     
    

0x04 Testing

Documentation

  • Modules: python3 -c 'print(__import__("my_module").__doc__)'
  • Classes: python3 -c 'print(__import__("my_module").MyClass.__doc__)'
  • Functions (inside and outside a class): python3 -c 'print(__import__("my_module").my_function.__doc__)' and python3 -c 'print(__import__("my_module").MyClass.my_function.__doc__)'

Python Unit Tests

  • unittest module
  • File extension .py
  • Files and folders star with test_
  • Organization:for models/base.py, unit tests in: tests/test_models/test_base.py
  • Execution command: python3 -m unittest discover tests
  • or: python3 -m unittest tests/test_models/test_base.py

run test in interactive mode

$ echo "python3 -m unittest discover tests" | bash

0x05 Usage

List of commands and examples usage:

The prompt (hbnb) waits for a command in an infinite loop.

  • help

example:

  • quit

example:

0x06 License

0x07 Contributing

0x08 Todo

0x09 Changelog

0x0A Tests

0x0B Questions

0x0C Conclusion

0x0D References

0x0E Acknowledgements

0x0F History

0x10 Credits

Rodrigo

Rodrigo Mato | LinkedIn

RodrigoMato00 | Github



Ronald

Ronald Rivero | Twitter

Ronald Rivero | LinkedIn

Ralex | Github


Owner
Ronald Alexander
Software Developer with Quality Management Systems background. Thinking in TICS that improves the process.
Ronald Alexander
A Python tool that parses JSON documents using JsonPath

A Python tool that parses JSON documents using JsonPath

8 Dec 18, 2022
jq for Python programmers Process JSON and HTML on the command-line with familiar syntax.

jq for Python programmers Process JSON and HTML on the command-line with familiar syntax.

Denis Volk 3 Jan 09, 2022
A python library to convert arbitrary strings representing business opening hours into a JSON format that's easier to use in code

A python library to convert arbitrary strings representing business opening hours into a JSON format that's easier to use in code

Adrian Edwards 9 Dec 02, 2022
Creates fake JSON files from a JSON schema

Use jsf along with fake data generators to provide consistent and meaningful fake data for your system.

Andy Challis 86 Jan 03, 2023
A fast streaming JSON parser for Python that generates SAX-like events using yajl

json-streamer jsonstreamer provides a SAX-like push parser via the JSONStreamer class and a 'object' parser via the ObjectStreamer class which emits t

Kashif Razzaqui 196 Dec 15, 2022
A fast JSON parser/generator for C++ with both SAX/DOM style API

A fast JSON parser/generator for C++ with both SAX/DOM style API Tencent is pleased to support the open source community by making RapidJSON available

Tencent 12.6k Dec 30, 2022
Console to handle object storage using JSON serialization and deserealization.

Console to handle object storage using JSON serialization and deserealization. This is a team project to develop a Python3 console that emulates the AirBnb object management.

Ronald Alexander 3 Dec 03, 2022
JSON Interoperability Vulnerability Labs

JSON Interoperability Vulnerability Labs Description These are the companion labs to my research article "An Exploration of JSON Interoperability Vuln

Bishop Fox 168 Dec 25, 2022
This open source Python project allow you to create JSON data trees using Minmup.com

This open source Python project allow you to create JSON data trees using Minmup.com. I try to develop this project all the time. But feel free to use :).

Arttu Väisänen 1 Jan 30, 2022
Fileson - JSON File database tools

Fileson is a set of Python scripts to create JSON file databases

Joonas Pihlajamaa 2 Feb 02, 2022
cysimdjson - Very fast Python JSON parsing library

Fast JSON parsing library for Python, 7-12 times faster than standard Python JSON parser.

TeskaLabs 235 Dec 29, 2022
A daily updated JSON dataset of all the Open House London venues, events, and metadata

Open House London listings data All of it. Automatically scraped hourly with updates committed to git, autogenerated per-day CSV's, and autogenerated

Jonty Wareing 4 Jan 01, 2022
No more boilerplate to check and build a Python object from JSON.

JSONloader This module is for you if you're tired of writing boilerplate that: builds a straightforward Python object from loaded JSON. checks that yo

3 Feb 05, 2022
API that provides Wordle (ES) solutions in JSON format

Wordle (ES) solutions API that provides Wordle (ES) solutions in JSON format.

Álvaro García Jaén 2 Feb 10, 2022
Ibmi-json-beautify - Beautify json string with python

Ibmi-json-beautify - Beautify json string with python

Jefferson Vaughn 3 Feb 02, 2022
JsonParser - Parsing the Json file by provide the node name

Json Parser This project is based on Parsing the json and dumping it to CSV via

Ananta R. Pant 3 Aug 08, 2022
import json files directly in your python scripts

Install Install from git repository pip install git+https://github.com/zaghaghi/direct-json-import.git Use With the following json in a file named inf

Hamed Zaghaghi 51 Dec 01, 2021
An tiny CLI to load data from a JSON File during development.

JSON Server - An tiny CLI to load data from a JSON File during development.

Yuvraj.M 4 Mar 22, 2022
simplejson is a simple, fast, extensible JSON encoder/decoder for Python

simplejson simplejson is a simple, fast, complete, correct and extensible JSON http://json.org encoder and decoder for Python 3.3+ with legacy suppo

1.5k Jan 05, 2023
Make JSON serialization easier

Make JSON serialization easier

4 Jun 30, 2022