Saravanan666/pypi-org huggingface dataset:
Package: django-geojson-tiles
A simple Django view to serve GeoJSON tiles from a GeoDjango modelDescriptionThe view will return a GeoJSON FeatureCollection for each tile.
Each feature corresponds to a row of the model.Setuppip install django-geojson-tilesAdd the following to your urls.py:from geojson_tiles.views import GeoJSONTile
from your_app import GeometryModel

urlpatterns = patterns('',
    url(r'^your_endpoint/(?P<z>\d+)/(?P<x>\d+)/(?P<y>\d+).json$',
        GeoJSONTile(GeometryModel, geometry_field='geometry_field', trim_to_boundary=True))
)Notesgeometry_field='geometry_field'specifies the geometry to use in the feature. If no geometry_field is specified: the first GeometryField in the model’s field set is used.trim_to_boundary=Truewill result in GeoJSON tiles with geometries trimmed to the tile boundaryproperties=[...]can be used to limit the feature’s properties that are serializedproperties={'field_name':'property name'}will limit the feature’s properties and map field names (keys) to property names (values).
Package: django-geolocation
=====
geolocationgeolocation is a Django app which takes the IP address of the client and,
exploiting an external API (via get requests), gives information about
the client's location based on the IP address. After this, the address
is stored in a postgre database which is used to count how many times
the client has connected to the web app. The index page shows the
geolocation data of the client.Quick startAdd "geolocation" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'geolocation',
]Include the geolocation URLconf in your project urls.py like this::path('geolocation/', include('geolocation.urls')),Runpython manage.py migrateto create the geolocation models.Start the development server and visithttp://127.0.0.1:8000/
Package: django-geolocation-fields
django-geolocation-fieldsA Django app to facilitate the manipulation of Geolocation objects in a GeoDjango app without using a spatial database.Detailed documentation is in the "docs" directory.Quick start$pipinstalldjango-geolocation-fieldsThe project is still in developmentHere is an example that uses ithttps://github.com/syk1k/django-geolocationAdd "geolocation_fields" to your INSTALLED_APPS setting like this:INSTALLED_APPS=[#...'geolocation_fields',]Documentation page
Package: django-geonames-api
django-geonames is a simple Django app to implement the geonames database in
your Django application. (load a contry from geonames, have the geographic
autocompletion)No detailed documentation is available for the time being.Quick startAdd “django-geonames” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'geography',
    ...
]Runpython manage.py migrateto create the geonames models.How to test?python runtests.py –settings test_settings
Package: django-geonames-cities
Alpha: DO NOT USE IN PRODUCTIONDjango geonames is a Django app that allows you to have a local replica of some data fromhttps://geonames.org. It has management commands to copy locally:
1. The countries of the world
2. All the administrative divisions of one or more countries specified in the configuration
3. If Italan data is downloaded, the management command downloads also some data from Istituto Italiano di Statisticahttps://www.istat.it/to enable the calculation of the Italian national identifier Codice Fiscale.Quick startAdd “geonames” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'geonames',
]Runpython manage.py migrateto create the models.Configure ….
Package: django-geonames-place
Application to access Geonames Places directly from Django.
The application can create places by using a geonames id or by using a search
address.This application depends on the very usefulPython Geocoderlibrary.DocumentationThe full documentation is athttps://django-geonames-place.readthedocs.io.QuickstartInstall Django Geonames Place:pip install django-geonames-placeAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'geonames_place.apps.GeonamesPlaceConfig',...)Add the settingsGEONAMES_KEYandGEONAMES_MAX_RESULTS. TheGEONAMES_KEYis your Geoname API key, and theGEONAMES_MAX_RESULTSis used to set the
maximum number of results when searching Geonames.GEONAMES_KEY='<GEONAMES_USERNAME>'GEONAMES_MAX_RESULTS=10To reference Geonames Place in your models:fromdjango.dbimportmodelsfromgeonames_place.modelsimportPlaceclassMyModel(models.Model):...place=models.ForeignKey(Place,on_delete=models.CASCADE)...Running TestsDoes the code actually work?export GEONAMES_KEY=<GEONAMES_USERNAME>
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.6.0 (2020-03-30)Added SelectMultiple autocomplete widget.0.5.0 (2020-03-27)Added autocomplete widget and view to use app outside of Django
admin.0.1.0 (2018-11-13)First release on PyPI.
Package: django-geonode-client
# geonode-client [![Build Status](https://travis-ci.org/GeoNode/geonode-client.svg?branch=master)](https://travis-ci.org/GeoNode/geonode-client) [![Code Climate](https://codeclimate.com/github/GeoNode/geonode-viewer/badges/gpa.svg)](https://codeclimate.com/github/GeoNode/geonode-viewer) [![Test Coverage](https://codeclimate.com/github/GeoNode/geonode-viewer/badges/coverage.svg)](https://codeclimate.com/github/GeoNode/geonode-viewer/coverage)OL3 - React map viewer for GeoNode## InstallationInstallnodeandnpm. We would encourage you to use [nvm](https://github.com/creationix/nvm) a version manager for node.You neednode > 5Runnpm installto install all dependencies.## Development ServerRunnpm startto start the development server. Visit your browser athttp://localhost:8080to see the result.## TestingDuring development runnpm run test:watchto run tests on every file change.Runnpm testto run the full test suite with code coverage report.## BuildingBuilding is done via webpack and the command isnpm buildThe dist folder is where the minified versions of these files are stored.## Deployment to GH-pagesAutomated deployment via travis is enabled for the master branch.If you want to deploy manually to gh-pages usenpm run deploy### Important
The deplyoment uses theindex-gh.htmlplease keep this file in sync withindex.htmland change the path once the repo changes it’s name. The.travis.ymlneeds to be changed as well.## Integrating into GeoNode/DjangoAdddjango-geonode-clientto your requirements.txt
Addgeonode-clientto yourINSTALLED_APPS### For GeoNode
Change theLAYER_PREVIEW_LIBRARYtoreact### For Django
We added templatetags you can use in your templatesAdd{% client_viewer_js %}to include the viewer javasricpt
Add{% client_composer_js %}to include the composer javasricptThe following templates are available:client_map_view_htmlfor the full map viewclient_map_detail_view_htmlfor a smaller map view (as in the map preview)client_map_new_htmlcreate a new map with composerclient_layer_map_htmlsmaller map view for the layer preview
Package: django-geoposition
A model field that can hold a geoposition (latitude/longitude), and corresponding admin/form widget.PrerequisitesStarting with version 0.3, django-geoposition requires Django 1.8 or greater.
If you need to support Django versions prior to 1.8 please use django-geoposition 0.2.3.
For Django versions prior to 1.4.10 please use django-geoposition 0.1.5.InstallationUse your favorite Python packaging tool to installgeopositionfromPyPI, e.g.:pip install django-geopositionAdd"geoposition"to yourINSTALLED_APPSsetting:INSTALLED_APPS = (
    # …
    "geoposition",
)Set your Google API key in you settings file:GEOPOSITION_GOOGLE_MAPS_API_KEY = 'YOUR_API_KEY'API keys may be obtained here:https://developers.google.com/maps/documentation/javascript/get-api-keyIf you are still using Django <1.3, you are advised to installdjango-staticfilesfor static file serving.Usagedjango-geopositioncomes with a model field that makes it pretty
easy to add a geoposition field to one of your models. To make use of
it:In yourmyapp/models.py:from django.db import models
from geoposition.fields import GeopositionField

class PointOfInterest(models.Model):
    name = models.CharField(max_length=100)
    position = GeopositionField()This enables the following simple API:>>> from myapp.models import PointOfInterest
>>> poi = PointOfInterest.objects.get(id=1)
>>> poi.position
Geoposition(52.522906,13.41156)
>>> poi.position.latitude
52.522906
>>> poi.position.longitude
13.41156Form field and widgetAdminIf you use aGeopositionFieldin the admin it will automatically
show aGoogle Mapswidget with a marker at the currently stored
position. You can drag and drop the marker with the mouse and the
corresponding latitude and longitude fields will be updated
accordingly.It looks like this:Regular FormsUsing the map widget on a regular form outside of the admin requires
just a little more work. In your template make sure thatjQueryis includedthe static files (JS, CSS) of the map widget are included (just use{{ form.media }})Example:<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<form method="POST" action="">{% csrf_token %}
    {{ form.media }}
    {{ form.as_p }}
</form>SettingsYou can customize theMapOptionsandMarkerOptionsused to initialize the
map and marker in JavaScript by definingGEOPOSITION_MAP_OPTIONSorGEOPOSITION_MARKER_OPTIONSin yoursettings.py.Example:GEOPOSITION_MAP_OPTIONS = {
    'minZoom': 3,
    'maxZoom': 15,
}

GEOPOSITION_MARKER_OPTIONS = {
    'cursor': 'move'
}Please note that you cannot use a value likenew google.maps.LatLng(52.5,13.4)for a setting likecenterorpositionbecause that would end up as a
string in the JavaScript code and not be evaluated. Please useLat/Lng Object Literalsfor that purpose, e.g.{'lat': 52.5, 'lng': 13.4}.You can also customize the height of the displayed map widget by settingGEOPOSITION_MAP_WIDGET_HEIGHTto an integer value (default is 480).LicenseMIT
Package: django-geopostcodes
django-geopostcodesDjango modelling forGeoPostcodesNOTE: This repository does not include the actual data, you must purchase this from geopostcodes.com and then import it, as per the documentation at django-geopostcodes.readthedocs.orgFree software: MIT licenseDocumentation:https://django-geopostcodes.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.1 (2022-10-06)Fix incorrect references todjango_geopostcodestodjango-geopostcodes.0.3.0 (2022-10-06)Dropped support for Python < 3.8Dropped support for Django < 4.00.2.2 (2022-07-25)First release on PyPI.
Package: django-geoprisma
This is aDjangoversion ofGeoPrisma.RequirementsSpatial databaseInstallationInstall Django-geoprismapip install django-geoprismaAdd this to yours installed appsINSTALLED_APPS = (
  ...
  'modeltranslation',
  'django.contrib.gis',
  'geoprisma',
  'geoprisma.acl',
)NoteIf you want to use the admin integration with django-modeltranslation,modeltranslationmust be put beforedjango.contrib.admin(only applies when using Django 1.7 or above).Specify yours languages for django-modeltranslationgettext = lambda s: s
LANGUAGES = (
  ('en',gettext('English')),
  ...
)Your template context processors must look like thisTEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.core.context_processors.static",
    "django.core.context_processors.tz",
    "django.contrib.messages.context_processors.messages",
    "django.core.context_processors.request"
)Sync your databasepython manage.py syncdbLoad initial datapython manage.py loaddata defaultNow you are ready to use geoprisma.UsageIn a future documentation.ThanksTo do
Package: django-geostore-routing
django-geostore-routingPGRouting plugin for django-geostoreAdd topology creation and update on Linestring based layersAdd custom fields and endpoint in django-geostore API to compute routinghttps://django-geostore-routing.readthedocs.io/en/latest/RequirementsGeneralPython 3.6+Postgresql 10+PostGIS 2.4+PgRouting 2.5+Librariesthese are debian packages requiredlibpq-dev   (psycopg2)gettext     (translations)binutils    (django.contrib.gis)libproj-dev (django.contrib.gis)gdal-bin    (django.contrib.gis)recommendedpostgresql-client (if you want to use ./manage.py dbshell command)Installationfrom PYPIpipinstalldjango-geostore-routingfrom GitHubgitclonehttps://github.com/Terralego/django-geostore-routing.gitcddjango-geostore-routing
python3setup.pyinstallin your project settingsINSTALLED_APPS=('geostore','geostore_routing',)Developmentwith docker :docker-composebuild
docker-composeup
docker-composerunweb./manage.pytestwith pip :python3.6-mvenvvenvsourceactivatevenv/bin/activate
pipinstall-e.[dev]CHANGELOG0.9.11         (2021-03-12)Add message no way when on edge casesReverse way when waypoints are reversed0.9.10         (2021-03-09)Add message no way found0.9.9          (2021-02-18)Fix routing without routes0.9.8          (2021-02-11)Fix waypoints, remove legs between waypoints and start0.9.7          (2020-12-15)Add waypoints with coordinates and distance to route0.9.6          (2020-11-06)Improve compatibility with django-geostore > 0.5.20.9.5          (2020-10-30)Fix default routing layer serializerChange way to load signalsImprove test coverage0.9.4          (2020-10-28)Improve compatibility with django-geostore > 0.5.00.9.3          (2020-10-27)Fix release0.9.2          (2020-10-27)Require django-geostore 0.5.0 minimum0.9.1          (2020-10-27)Wrong release0.9.0          (2020-10-27)First release
Package: django-geo-timezones
Geo timezones is a simple Django app to determine timezone by geographic coordinates.Quick startAdd “geo_timezones” to your INSTALLED_APPS settings like this:INSTALLED_APPS = (
    ...
    'geo_timezones',
    ...
)Download SHP TZ_DATA file fromhttp://efele.net/maps/tz/world/.Runpython manage.py migrateto create the timezones models.Runpython manage.py geo_timezones_update –shp_filename=<your shp tz_data file>to update timezones.Use app in your code:...
from geo_timezones import get_timezone_name_by_coordinates
...

timezone_name = get_timezone_name_by_coordinates(55.3424, 61.0034)  # lat, long
Package: django-geowidgets
django-geowidgetsCurrently this only containsLatLonWidgetandLatLonField.LatLonWidgetis a simpleMultiWidgetshowing latitude and
longitude.LatLonFieldis a form field that by default usesLatLonWidget.from django import forms

from geowidgets import LatLonField

from . import models


class MyForm(forms.ModelForm):
    location = LatLonField(
        label="Co-ordinates",
        help_text="Longitude and latitude in decimal degrees",
    )

    class Meta:
        model = models.MyModeldjango-geowidgets is free software, available under the GNU General
Public License v3. See the LICENCE file for details.History0.1.1 (2021-04-08)Updated requirements so that it is compatible with Django 3.0.1.0 (2019-08-13)Initial release.
Package: django-gerencianet
=====Gerencianet=====Gerencianet is a simple Django app to make the integration with the GerenciaNet payment Gateway.Quick start-----------1. Add "gerencianet" to your INSTALLED_APPS setting like this::INSTALLED_APPS = (...'gerencianet',)2. Include the base gerencianet URLconf in your project urls.py like this::url(r'^gerencianet/', include('gerencianet.urls')),3. Run `python manage.py migrate` to create the gerencianet models.OBS. If you get some errors like "gerencianet_paymentlog already exists", try to fake the initial migration for the model. Ex: python manage.py migrate gerencianet --fake-initial
Package: django-gesha
django-geshaDocumentation•Issue Tracker•SourceJavaScript utilities forDjangoprojects.Features:Add contextin Django views to be used in JavaScript functions.Reverse URLsnatively in JavaScript (equivalent toreverse()in Python and{% url %}in
templates).Written in TypeScript and fully-typed Python.Getting startedTo install and set updjango-geshain an existing Django project, see:InstallationUser GuideStarting a new Django project? Consider usingdjango-gesha-template, which is
pre-configured withdjango-geshaand a pipeline for TypeScript integration.ContributingSeeContributing.LicenseMIT.
Package: django-get-autologin
===================django-get-utologin===================Django Get Autologin is a simple Django app to login with GET request type that it use Token parameter.Installation------------Install package from PYPI:pip install django-pure-paginationor clone and install from repository:git clone git@github.com:massumo/django-get-autologin.gitcd django-get-autologinpython setup.py installConfigurations--------------Add "get_autologin" to your INSTALLED_APPS setting like this:INSTALLED_APPS = [...'get_autologin',]Include the polls URLconf in your project urls.py like this:from django.conf.urls import url, includeurl(r'^get-autologin/', include('get_autologin.urls', namespace='get_autologin')),P.S: This namespace important for test.Settings.py-----------Override AUTHENTICATION_BACKENDSAUTHENTICATION_BACKENDS = ['get_autologin.backends.UrlTokenBackend','django.contrib.auth.backends.ModelBackend']Define LOGIN_URL and LOGIN_REDIRECT_URL (You have to define)LOGIN_URL = "your-login-url"LOGIN_REDIRECT_URL = "your-login-redirect-url"Migrate-------Run `python manage.py migrate` to create the get_autologin models.That's all.Admin Page----------Tokens are managed in admin page. Sample management page:http://example.com/admin/get_autologin/token/Example Request---------------http://example.com/get-autologin/?token={token}If the token parameter is correct when this request is made, it means that you have logged in as a user who has this token.
Package: django-getenv
A quick’n’easy way to use environment variables in your Django (and
Python) projects.Free software: BSD licenseIntroductionIf you’re usingdjango-dotenvto get the
most out of your.envfile, you want to use the values there in yourDjangoproject’s settings.It will convert boolean, integer and float values to their native Python
types.There’s nothing here that is Django specific, but I’m using it with
Django so that’s what I’ve called it.Installationpip install django-getenvUsageIn yoursettings.pyfile (or equivalent), add:from getenv import envThen to read in your environment variables, do this:SECRET_KEY = env("SECRET_KEY")If you want to provide a default (in case the environment variable isn’t
set), try:SECRET_KEY = env("SECRET_KEY", "a_secret_key")You can also use getenv in a template:::{% load getenv %}Current path: {% getenv “PATH” %}For best results, mix withdjango-dotenvanddj-database-url.History1.3.2 (2017-04-15)Use custom ImproperlyConfigured instead of Django’s (#5)1.3.1 (2014-03-07)Fix HISTORY.rstRemove Python 2.6 from Travis configuration1.3.0 (2014-03-06)Improved (cookiecutter-pypackage style) project layout1.2.0 (2014-01-14)Specify an environment variable as required, and raise ImproperlyConfigured
exception if not present (#2)1.1.0 (2013-07-24)Marked as “5 - Production/Stable” instead of “4 - Beta”Cleaned up READMEAdded CHANGES1.0.0 (2013-07-19)Initial release
Package: django-get-once
Django Get OnceA Django Rest Framework Mixin for viewsets that only allows you to retrieve an object exactly once.InstallationFrom PYPi usingpip:pip install django-get-onceUsageCan only be used with ViewSets:fromget_onceimportGetOnceMixinfromrest_framework.viewsetimportGenericViewSetclassMyViewSet(GetOnceMixin,GenericViewSet):[...]LicenceThis package is distributed underMIT Licence.
Package: django-getpaid
Welcome to django-getpaiddjango-getpaid is payment processing framework for DjangoDocumentationThe full documentation is athttps://django-getpaid.readthedocs.io.Featuressupport for multiple payment brokers at the same timevery flexible architecturesupport for asynchronous status updates - both push and pullsupport for modern REST-based broker APIssupport for multiple currencies (but one per payment)support for global and per-plugin validatorseasy customization with provided base abstract models and swappable mechanic (same as with Django’s User model)QuickstartInstall django-getpaid and at least one payment backend:pip install django-getpaid
pip install django-getpaid-payuAdd them to yourINSTALLED_APPS:INSTALLED_APPS=[...'getpaid','getpaid_payu',# one of plugins...]Add getpaid to URL patterns:urlpatterns=[...path('payments/',include('getpaid.urls')),...]Define anOrdermodel by subclassinggetpaid.models.AbstractOrderand define some required methods:fromgetpaid.modelsimportAbstractOrderclassMyCustomOrder(AbstractOrder):amount=models.DecimalField(decimal_places=2,max_digits=8)description=models.CharField(max_length=128)buyer=models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE)defget_absolute_url(self):returnreverse('order-detail',kwargs={"pk":self.pk})defget_total_amount(self):returnself.amountdefget_buyer_info(self):return{"email":self.buyer.email}defget_currency(self):return"EUR"defget_description(self):returnself.descriptionNoteIf you already have an Order model and don’t want to subclassAbstractOrderjust make sure you implement all methods.Inform getpaid of your Order model insettings.pyand provide settings for payment backends:GETPAID_ORDER_MODEL='yourapp.MyCustomOrder'GETPAID_BACKEND_SETTINGS={"getpaid_payu":{# take these from your merchant panel:"pos_id":12345,"second_key":"91ae651578c5b5aa93f2d38a9be8ce11","oauth_id":12345,"oauth_secret":"12f071174cb7eb79d4aac5bc2f07563f",},}Write a view that will create the Payment.An example view and its hookup to urls.py can look like this:# orders/views.pyfromgetpaid.formsimportPaymentMethodFormclassOrderView(DetailView):model=Orderdefget_context_data(self,**kwargs):context=super(OrderView,self).get_context_data(**kwargs)context["payment_form"]=PaymentMethodForm(initial={"order":self.object,"currency":self.object.currency})returncontext# main urls.pyurlpatterns=[# ...path("order/<int:pk>/",OrderView.as_view(),name="order_detail"),]You’ll also need a template (order_detail.htmlin this case) for this view.
Here’s the important part:<h2>Choose payment broker:</h2>
<form action="{% url 'getpaid:create-payment' %}" method="post">
    {% csrf_token %}
    {{ payment_form.as_p }}
    <input type="submit" value="Checkout">
</form>Running Testspoetry install
poetry run toxAlternativesdjango-paymentsCreditsCreated byKrzysztof Dorosz.
Redesigned and rewritten byDominik Kozaczko.Development of version 2.0 sponsored bySUNSCRAPERSDisclaimerThis project has nothing in common withgetpaidplone project.
Package: django-getpaid-epay
A django-getpaid payment backend for Kazkommertsbank EpayDocumentationThe full documentation is athttps://django-getpaid-epay.readthedocs.org.FeaturesAuthenticate paymentCapture blocked money from adminReverse payment from adminRefund payment from adminCheck status from adminDependenciesHere is a list of dependecies:# obvious
django
django-getpaid

M2Crypto
django-model-utils
xmltodict
requestsWarningYou might need to install some system packages to compile M2Crypto. What to install?QuickstartInstall django-getpaid and then install django-getpaid-epay:pip install django-getpaid-epayAddepaytoINSTALLED_APPSandGETPAID_BACKENDSin your django project. Do not forget to configure theGETPAID_ORDER_MODELsetting.Run migration:./manage.py migrateBasic configurationHere is minimal configuration:GETPAID_BACKENDS_SETTINGS = {
    'epay' : {
        "key_passphrase" : 'your private key passphrase',  # can be omitted if you have removed passphrase
        "merchant_private_key" : 'path to your private key',
        "merchant_id" :  "92061101",
        "merchant_name" : "Test Shop",
        "merchant_cert_id" : "00c182b189"
        # "kkb_pub_key": 'path to Kazkom Public Key (kkbca.pem)',  # optional
        # "modify_order_id": lambda id: id + 100000,
        # "unmodify_order_id": lambda id: id - 100000,
        # 'scheme': 'http',
        # 'testing' : True,       # optional
    },
}CreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2016-02-22)First release on PyPI.0.1.3 (2016-04-22)AddedtemplatesettingAddedget_emailsettingAddedget_languagesettingAddedget_templatesettingAddedget_fail_backlinksettingAddedget_backlink_urlsettingAddedauto_capturesettingUpdated test geteway url tohttps://testpay.kkb.kz0.1.3 (2016-04-22)Bugfixschemesetting handling