geo-engine-python 0.1.1__tar.gz → 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.4
2
+ Name: geo-engine-python
3
+ Version: 0.1.3
4
+ Summary: SDK oficial para Geo-Engine: Rastreo y Geofencing
5
+ Home-page: https://github.com/AlexG695/geo-engine-python
6
+ Author: AlexG695
7
+ Author-email: AlexG <alexg@geoengine.dev>
8
+ Project-URL: Homepage, https://geoengine.dev
9
+ Project-URL: Bug Tracker, https://github.com/AlexG695/geo-engine/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: requests>=2.25.0
16
+ Dynamic: author
17
+ Dynamic: home-page
18
+ Dynamic: requires-python
19
+
20
+ # 🐍 Geo-Engine Python SDK
21
+
22
+ Cliente oficial en **Python** para interactuar con la plataforma **Geo-Engine**.
23
+ Permite enviar ubicaciones en tiempo real, gestionar geocercas y consumir la API de Geo-Engine desde aplicaciones **Django**, **Flask**, scripts o entornos de **Data Science**.
24
+
25
+ Diseñado para ser **simple**, **rápido** y **fácil de integrar**.
26
+
27
+ ---
28
+
29
+ ## 🚀 Instalación
30
+
31
+ Instala el SDK usando `pip`:
32
+
33
+ ```bash
34
+ pip install geo-engine-python
35
+ ```
36
+
37
+ ---
38
+
39
+ ## ⚡ Uso Rápido
40
+
41
+ Envía la ubicación de un dispositivo en pocos pasos:
42
+
43
+ ```python
44
+ from geo_engine import GeoEngine
45
+
46
+ # 1. Inicializar el cliente
47
+ # Por defecto se conecta al entorno de producción
48
+ client = GeoEngine(api_key="sk_live_123456")
49
+
50
+ # 2. Enviar ubicación
51
+ try:
52
+ res = client.send_location(
53
+ device_id="camion-01",
54
+ lat=19.4326,
55
+ lng=-99.1332
56
+ )
57
+ print(f"✅ Enviado: {res}")
58
+ except Exception as e:
59
+ print(f"❌ Error: {e}")
60
+ ```
61
+
62
+ ---
63
+
64
+ ## 🔧 Configuración Avanzada
65
+
66
+ Puedes personalizar la configuración para conectarte a otros entornos (por ejemplo, local o staging) o modificar URLs internas:
67
+
68
+ ```python
69
+ client = GeoEngine(
70
+ api_key="sk_test_...",
71
+ ingest_url="http://localhost:8080",
72
+ management_url="http://localhost:8081"
73
+ )
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 🧩 Casos de Uso Comunes
79
+
80
+ * 📍 **Tracking en tiempo real** de vehículos o dispositivos IoT
81
+ * 🚚 **Logística y última milla**
82
+ * 🗺️ **Geocercas** y eventos por entrada/salida
83
+ * 📊 **Análisis de datos geoespaciales** en notebooks o pipelines
84
+
85
+ ---
86
+
87
+ ## 🔐 Autenticación
88
+
89
+ El SDK utiliza **API Keys** para autenticarse.
90
+ Asegúrate de mantenerlas seguras y **no exponerlas en el frontend**.
91
+
92
+ ```python
93
+ GeoEngine(api_key="sk_live_...")
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 🧪 Compatibilidad
99
+
100
+ * Python **3.8+**
101
+ * Funciona con:
102
+
103
+ * Django
104
+ * Flask
105
+ * FastAPI
106
+ * Scripts CLI
107
+ * Jupyter / Data Science
108
+
109
+ ---
110
+
111
+ ## 📄 Licencia
112
+
113
+ MIT © Geo-Engine
114
+
115
+ ---
116
+
117
+ ## 🤝 Soporte
118
+
119
+ ¿Tienes dudas o sugerencias?
120
+ Abre un issue o contáctanos en **[support@geoengine.dev](mailto:support@geoengine.dev)**
121
+
122
+ ---
@@ -0,0 +1,103 @@
1
+ # 🐍 Geo-Engine Python SDK
2
+
3
+ Cliente oficial en **Python** para interactuar con la plataforma **Geo-Engine**.
4
+ Permite enviar ubicaciones en tiempo real, gestionar geocercas y consumir la API de Geo-Engine desde aplicaciones **Django**, **Flask**, scripts o entornos de **Data Science**.
5
+
6
+ Diseñado para ser **simple**, **rápido** y **fácil de integrar**.
7
+
8
+ ---
9
+
10
+ ## 🚀 Instalación
11
+
12
+ Instala el SDK usando `pip`:
13
+
14
+ ```bash
15
+ pip install geo-engine-python
16
+ ```
17
+
18
+ ---
19
+
20
+ ## ⚡ Uso Rápido
21
+
22
+ Envía la ubicación de un dispositivo en pocos pasos:
23
+
24
+ ```python
25
+ from geo_engine import GeoEngine
26
+
27
+ # 1. Inicializar el cliente
28
+ # Por defecto se conecta al entorno de producción
29
+ client = GeoEngine(api_key="sk_live_123456")
30
+
31
+ # 2. Enviar ubicación
32
+ try:
33
+ res = client.send_location(
34
+ device_id="camion-01",
35
+ lat=19.4326,
36
+ lng=-99.1332
37
+ )
38
+ print(f"✅ Enviado: {res}")
39
+ except Exception as e:
40
+ print(f"❌ Error: {e}")
41
+ ```
42
+
43
+ ---
44
+
45
+ ## 🔧 Configuración Avanzada
46
+
47
+ Puedes personalizar la configuración para conectarte a otros entornos (por ejemplo, local o staging) o modificar URLs internas:
48
+
49
+ ```python
50
+ client = GeoEngine(
51
+ api_key="sk_test_...",
52
+ ingest_url="http://localhost:8080",
53
+ management_url="http://localhost:8081"
54
+ )
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 🧩 Casos de Uso Comunes
60
+
61
+ * 📍 **Tracking en tiempo real** de vehículos o dispositivos IoT
62
+ * 🚚 **Logística y última milla**
63
+ * 🗺️ **Geocercas** y eventos por entrada/salida
64
+ * 📊 **Análisis de datos geoespaciales** en notebooks o pipelines
65
+
66
+ ---
67
+
68
+ ## 🔐 Autenticación
69
+
70
+ El SDK utiliza **API Keys** para autenticarse.
71
+ Asegúrate de mantenerlas seguras y **no exponerlas en el frontend**.
72
+
73
+ ```python
74
+ GeoEngine(api_key="sk_live_...")
75
+ ```
76
+
77
+ ---
78
+
79
+ ## 🧪 Compatibilidad
80
+
81
+ * Python **3.8+**
82
+ * Funciona con:
83
+
84
+ * Django
85
+ * Flask
86
+ * FastAPI
87
+ * Scripts CLI
88
+ * Jupyter / Data Science
89
+
90
+ ---
91
+
92
+ ## 📄 Licencia
93
+
94
+ MIT © Geo-Engine
95
+
96
+ ---
97
+
98
+ ## 🤝 Soporte
99
+
100
+ ¿Tienes dudas o sugerencias?
101
+ Abre un issue o contáctanos en **[support@geoengine.dev](mailto:support@geoengine.dev)**
102
+
103
+ ---
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.4
2
+ Name: geo-engine-python
3
+ Version: 0.1.3
4
+ Summary: SDK oficial para Geo-Engine: Rastreo y Geofencing
5
+ Home-page: https://github.com/AlexG695/geo-engine-python
6
+ Author: AlexG695
7
+ Author-email: AlexG <alexg@geoengine.dev>
8
+ Project-URL: Homepage, https://geoengine.dev
9
+ Project-URL: Bug Tracker, https://github.com/AlexG695/geo-engine/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: requests>=2.25.0
16
+ Dynamic: author
17
+ Dynamic: home-page
18
+ Dynamic: requires-python
19
+
20
+ # 🐍 Geo-Engine Python SDK
21
+
22
+ Cliente oficial en **Python** para interactuar con la plataforma **Geo-Engine**.
23
+ Permite enviar ubicaciones en tiempo real, gestionar geocercas y consumir la API de Geo-Engine desde aplicaciones **Django**, **Flask**, scripts o entornos de **Data Science**.
24
+
25
+ Diseñado para ser **simple**, **rápido** y **fácil de integrar**.
26
+
27
+ ---
28
+
29
+ ## 🚀 Instalación
30
+
31
+ Instala el SDK usando `pip`:
32
+
33
+ ```bash
34
+ pip install geo-engine-python
35
+ ```
36
+
37
+ ---
38
+
39
+ ## ⚡ Uso Rápido
40
+
41
+ Envía la ubicación de un dispositivo en pocos pasos:
42
+
43
+ ```python
44
+ from geo_engine import GeoEngine
45
+
46
+ # 1. Inicializar el cliente
47
+ # Por defecto se conecta al entorno de producción
48
+ client = GeoEngine(api_key="sk_live_123456")
49
+
50
+ # 2. Enviar ubicación
51
+ try:
52
+ res = client.send_location(
53
+ device_id="camion-01",
54
+ lat=19.4326,
55
+ lng=-99.1332
56
+ )
57
+ print(f"✅ Enviado: {res}")
58
+ except Exception as e:
59
+ print(f"❌ Error: {e}")
60
+ ```
61
+
62
+ ---
63
+
64
+ ## 🔧 Configuración Avanzada
65
+
66
+ Puedes personalizar la configuración para conectarte a otros entornos (por ejemplo, local o staging) o modificar URLs internas:
67
+
68
+ ```python
69
+ client = GeoEngine(
70
+ api_key="sk_test_...",
71
+ ingest_url="http://localhost:8080",
72
+ management_url="http://localhost:8081"
73
+ )
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 🧩 Casos de Uso Comunes
79
+
80
+ * 📍 **Tracking en tiempo real** de vehículos o dispositivos IoT
81
+ * 🚚 **Logística y última milla**
82
+ * 🗺️ **Geocercas** y eventos por entrada/salida
83
+ * 📊 **Análisis de datos geoespaciales** en notebooks o pipelines
84
+
85
+ ---
86
+
87
+ ## 🔐 Autenticación
88
+
89
+ El SDK utiliza **API Keys** para autenticarse.
90
+ Asegúrate de mantenerlas seguras y **no exponerlas en el frontend**.
91
+
92
+ ```python
93
+ GeoEngine(api_key="sk_live_...")
94
+ ```
95
+
96
+ ---
97
+
98
+ ## 🧪 Compatibilidad
99
+
100
+ * Python **3.8+**
101
+ * Funciona con:
102
+
103
+ * Django
104
+ * Flask
105
+ * FastAPI
106
+ * Scripts CLI
107
+ * Jupyter / Data Science
108
+
109
+ ---
110
+
111
+ ## 📄 Licencia
112
+
113
+ MIT © Geo-Engine
114
+
115
+ ---
116
+
117
+ ## 🤝 Soporte
118
+
119
+ ¿Tienes dudas o sugerencias?
120
+ Abre un issue o contáctanos en **[support@geoengine.dev](mailto:support@geoengine.dev)**
121
+
122
+ ---
@@ -1,7 +1,9 @@
1
- geoengine.py
1
+ README.md
2
2
  pyproject.toml
3
+ setup.py
3
4
  geo_engine_python.egg-info/PKG-INFO
4
5
  geo_engine_python.egg-info/SOURCES.txt
5
6
  geo_engine_python.egg-info/dependency_links.txt
6
7
  geo_engine_python.egg-info/requires.txt
7
- geo_engine_python.egg-info/top_level.txt
8
+ geo_engine_python.egg-info/top_level.txt
9
+ geoengine/__init__.py
@@ -0,0 +1 @@
1
+ from .client import GeoEngine, GeoEngineError
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "geo-engine-python"
7
- version = "0.1.1"
7
+ version = "0.1.3"
8
8
  authors = [
9
- { name="AlexG", email="alexg695845@gmail.com" },
9
+ { name="AlexG", email="alexg@geoengine.dev" },
10
10
  ]
11
11
  description = "SDK oficial para Geo-Engine: Rastreo y Geofencing"
12
12
  readme = "README.md"
@@ -21,5 +21,5 @@ dependencies = [
21
21
  ]
22
22
 
23
23
  [project.urls]
24
- "Homepage" = "https://app.geoengine.dev"
24
+ "Homepage" = "https://geoengine.dev"
25
25
  "Bug Tracker" = "https://github.com/AlexG695/geo-engine/issues"
@@ -0,0 +1,29 @@
1
+ from setuptools import setup, find_packages
2
+ import os
3
+
4
+ setup(
5
+ name="geo-engine-python",
6
+ version="1.0.0",
7
+ description="Official Python Client for the Geo-Engine Platform",
8
+ author="AlexG695",
9
+ author_email="alexg@geoengine.dev",
10
+ url="https://github.com/AlexG695/geo-engine-python",
11
+ license="MIT",
12
+ packages=find_packages(),
13
+ install_requires=[
14
+ "requests>=2.25.0",
15
+ ],
16
+ classifiers=[
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Topic :: Software Development :: Libraries :: Python Modules",
25
+ "Topic :: Scientific/Engineering :: GIS",
26
+ ],
27
+ python_requires=">=3.7",
28
+ keywords="geofencing, maps, location, sdk, geojson",
29
+ )
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: geo-engine-python
3
- Version: 0.1.1
4
- Summary: SDK oficial para Geo-Engine: Rastreo y Geofencing
5
- Author-email: AlexG <alexg695845@gmail.com>
6
- Project-URL: Homepage, https://app.geoengine.dev
7
- Project-URL: Bug Tracker, https://github.com/AlexG695/geo-engine/issues
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: requests>=2.25.0
@@ -1,13 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: geo-engine-python
3
- Version: 0.1.1
4
- Summary: SDK oficial para Geo-Engine: Rastreo y Geofencing
5
- Author-email: AlexG <alexg695845@gmail.com>
6
- Project-URL: Homepage, https://app.geoengine.dev
7
- Project-URL: Bug Tracker, https://github.com/AlexG695/geo-engine/issues
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.7
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: requests>=2.25.0
@@ -1,84 +0,0 @@
1
- import requests
2
- import time
3
- import json
4
-
5
- class GeoEngine:
6
- DEFAULT_MANAGEMENT_URL = "https://api.geoengine.dev"
7
- DEFAULT_INGEST_URL = "https://ingest.geoengine.dev"
8
-
9
- def __init__(self, api_key, management_url=None, ingest_url=None):
10
- """
11
- Inicializa el cliente de GeoEngine.
12
- """
13
- if not api_key:
14
- raise ValueError("GeoEngine: API Key es requerida")
15
-
16
- self.api_key = api_key
17
- self.management_url = management_url or self.DEFAULT_MANAGEMENT_URL
18
- self.ingest_url = ingest_url or self.DEFAULT_INGEST_URL
19
- self.headers = {
20
- "Content-Type": "application/json",
21
- "X-API-Key": self.api_key,
22
- "User-Agent": "GeoEnginePython/1.0.0"
23
- }
24
-
25
- def send_location(self, device_id, lat, lng):
26
- """
27
- Envía una coordenada al motor de ingestión.
28
- """
29
- payload = {
30
- "device_id": device_id,
31
- "latitude": float(lat),
32
- "longitude": float(lng),
33
- "timestamp": int(time.time())
34
- }
35
-
36
- try:
37
- response = requests.post(
38
- f"{self.ingest_url}/ingest",
39
- json=payload,
40
- headers=self.headers,
41
- timeout=10
42
- )
43
- response.raise_for_status()
44
- return response.json()
45
- except requests.exceptions.RequestException as e:
46
- raise Exception(f"GeoEngine Error: {e}")
47
-
48
- def create_geofence(self, name, coordinates, webhook_url):
49
- """
50
- Crea una geocerca.
51
- coordinates debe ser una lista de listas: [[lat, lng], [lat, lng]]
52
- """
53
- if len(coordinates) < 3:
54
- raise ValueError("Se requieren al menos 3 puntos")
55
-
56
- # Convertir [Lat, Lng] a [Lng, Lat] para GeoJSON
57
- polygon = [[p[1], p[0]] for p in coordinates]
58
-
59
- # Cerrar polígono
60
- if polygon[0] != polygon[-1]:
61
- polygon.append(polygon[0])
62
-
63
- payload = {
64
- "name": name,
65
- "webhook_url": webhook_url,
66
- "geojson": {
67
- "type": "Polygon",
68
- "coordinates": [polygon]
69
- }
70
- }
71
-
72
- try:
73
- response = requests.post(
74
- f"{self.management_url}/geofences",
75
- json=payload,
76
- headers=self.headers,
77
- timeout=10
78
- )
79
- response.raise_for_status()
80
- return response.json()
81
- except requests.exceptions.RequestException as e:
82
- if response.content:
83
- raise Exception(f"API Error: {response.json().get('error', response.text)}")
84
- raise Exception(f"Connection Error: {e}")