Hi, this is my first API, I worked out a lot ๐
If you want to clone this first:
$ git clone [email protected]:maby200/PaymentsAPI.git
For this repo you'll need the packages listed in requirements.txt
.
Dont rush into the installation!
- First, create a new environment
$ virtualenv env
- Activate the environment (I'm using Linux)
$ source env/bin/activate
- (notice the
(env)
which means your environment is active)
Now we're ready to install the packages inrequirements.txt
(env) $ pip install -r requirements.txt
- With that done, you're set up to run the project
(env) $ python manage.py runserver
Once your project is running, open it in your browser with the url: http://127.0.0.1:8000/
.
I recommend you to:
- Go and create an account in:
http://127.0.0.1:8000/users/signup/
- Then go to
http://127.0.0.1:8000/users/login/
, login with the email and password you've chosen and - Copy the
access
token it apears on the page after successfuly login.
You can use Postman, or Thunder Client extension in VSCode to do the GET and POST, unfortunatelly you wont be able to do the entire CRUD since you are not admin.
For a better experience, you can go to http://127.0.0.1:8000/api/schema/redoc/
or http://127.0.0.1:8000/api/schema/swagger-ui/