Skip to content

Commit cec3e7e

Browse files
committed
changes the project to be python-rest-model to avoid name collisions on pypi
1 parent 2593ec4 commit cec3e7e

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ env*
55
dist/
66
python_rest_client.egg-info/*
77
rest_client.egg-info/*
8+
python_rest_model.egg-info/

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Introduction
22
============
3-
Python Rest Client exists to solve the common problem of consuming RESTful services.
3+
Python Rest Model exists to solve the common problem of consuming RESTful services.
44

55
The Problem
66
============
77
In an OOP language as Python, developers tend to think of their data as objects and associated attributes and behaviors. When it comes to consuming a RESTful service, you typically wrap the actual communication using functions, methods or classes and spend some time to design your handler(s). That typically results in repetitive and not-so-readable code. Also different developers usually have different approaches on how to handle this issue. If you want to make sure you are passing the right data types that would be a totally different story !
88

99
The Solution
1010
============
11-
Python Rest Client solves these issues by treating the RESTful endpoints as they should be ... endpoints to resources !
11+
Python Rest Model solves these issues by treating the RESTful endpoints as they should be ... endpoints to resources !
1212
It lets you define your own resources like you do in Django models, by extending a class and defining some attributes, and that's it ! You can have objects that handles data type validation on attributes, define the endpoints once at a single location, and the operations can be chained.
1313

1414
Quick Start
1515
============
1616

17-
After you install Python Rest Client you can use it as following.
17+
After you install Python Rest Model you can use it as following.
1818
```
19-
from rest_client import models # import models
20-
19+
from rest_model import models # import models
20+
2121
class Student(models.RestModel): # extend models.RestModel
2222
name = models.StringField()
2323
age = models.PositiveIntegerField()
@@ -78,4 +78,3 @@ Currently supported data types
7878
- ListField
7979
- PositiveIntegerField
8080
- PositiveFloatField
81-
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
99

1010
setup(
11-
name='python-rest-client',
12-
url="https://github.com/mdaif/python-rest-client",
11+
name='python-rest-model',
12+
url="https://github.com/mdaif/python-rest-model",
1313
version='1.0',
14-
packages=['rest_client', 'tests'],
14+
packages=['rest_model', 'tests'],
1515
include_package_data=True,
1616
license='OSI Approved', # example license
1717
description='A standard way to consume a RESTful service, inspired by Django models',

tests/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from rest_client import models
1+
from rest_model import models
22
from unittest.mock import patch
33
import unittest
44
import json

0 commit comments

Comments
 (0)