Skip to content

Commit

Permalink
Merge pull request #35 from deltwalrus/master
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
Jeff Pistone authored Aug 9, 2023
2 parents 292ff55 + d3aa102 commit a34a3f7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# [<img src="https://ipinfo.io/static/ipinfo-small.svg" alt="IPinfo" width="24"/>](https://ipinfo.io/) IPinfo Django Client Library

This is the official Django client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to lookup your own IP address, or get any of the following details for an IP:
This is the official Django client library for the [IPinfo.io](https://ipinfo.io) IP address API, allowing you to look up your own IP address, or get any of the following details for an IP:

- [IP to geolocation](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude and longitude)
- [IP to ASN](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting or company)
- [IP to geolocation](https://ipinfo.io/ip-geolocation-api) (city, region, country, postal code, latitude, and longitude)
- [IP to ASN](https://ipinfo.io/asn-api) (ISP or network operator, associated domain name, and type, such as business, hosting, or company)
- [IP to Company](https://ipinfo.io/ip-company-api) (the name and domain of the business that uses the IP address)
- [IP to Carrier](https://ipinfo.io/ip-carrier-api) (the name of the mobile carrier and MNC and MCC for that carrier if the IP is used exclusively for mobile traffic)

Expand Down Expand Up @@ -45,7 +45,7 @@ will return the following as an `HttpResponse` object:
'The IP address 216.239.36.21 is located at the coordinates 37.8342,-122.2900, which is in the city Emeryville.'
```

To get the details of user defined IP, we will import ipinfo package directly to the `view.py` file:
To get the details of a user-defined IP, we will import the ipinfo package directly to the `view.py` file:
```python
from django.shortcuts import render
from django.http import HttpResponse
Expand All @@ -66,7 +66,7 @@ def location(request):
return HttpResponse(response_string)
```

The above code will print the IP details provide. We can use GET and POST methods to get the details of user defined IP
The above code will print the IP details provided. We can use GET and POST methods to get the details of user-defined IP

```python
'The IP address 168.156.54.5 is located at the coordinates 47.6104,-122.2007, which is in the city Bellevue.'
Expand Down Expand Up @@ -110,7 +110,7 @@ IPINFO_IP_SELECTOR = my_custom_ip_selector_implementation

### Async support

`'ipinfo_django.middleware.IPinfoAsyncMiddleware'` can be used under ASGI. This is an async-only middleware which works only when placed in an async middleware chain, that is, a chain of Django middleware which are both async and async capable. For example:
`'ipinfo_django.middleware.IPinfoAsyncMiddleware'` can be used under ASGI. This is an async-only middleware that works only when placed in an async middleware chain, that is, a chain of Django middleware which are both async and async capable. For example:

```python
MIDDLEWARE = [
Expand Down Expand Up @@ -345,7 +345,7 @@ PYTHONPATH=. tox

### Other Libraries

There are official IPinfo client libraries available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails and Laravel. There are also many third party libraries and integrations available for our API.
There are official IPinfo client libraries available for many languages including PHP, Go, Java, Ruby, and many popular frameworks such as Django, Rails, and Laravel. There are also many third-party libraries and integrations available for our API.

### About IPinfo

Expand Down

0 comments on commit a34a3f7

Please sign in to comment.