xbase-util 0.0.5__tar.gz → 0.0.6__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.
@@ -1,10 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xbase_util
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: 网络安全基础工具
5
5
  Author: xyt
6
6
  Author-email: 2506564278@qq.com
7
7
  License: <MIT License>
8
- Requires-Dist: PyExecJS==1.5.1
9
8
 
10
9
  包含提取,预测,训练的基础工具
@@ -3,7 +3,7 @@ from distutils.core import setup
3
3
  from setuptools import find_packages
4
4
 
5
5
  setup(name="xbase_util",
6
- version="0.0.5",
6
+ version="0.0.6",
7
7
  description="网络安全基础工具",
8
8
  long_description="包含提取,预测,训练的基础工具",
9
9
  author="xyt",
@@ -11,10 +11,9 @@ setup(name="xbase_util",
11
11
  license="<MIT License>",
12
12
  packages=find_packages(),
13
13
  install_requires=[
14
- 'PyExecJS==1.5.1',
15
14
  ],
16
15
  zip_safe=False,
17
16
  package_data={
18
- 'xbase_util': ['../assets/*'],
17
+ 'xbase_util': ['../xbase_util_assets/*'],
19
18
  },
20
19
  include_package_data=True)
@@ -1,8 +1,11 @@
1
1
  import os
2
2
 
3
3
  import execjs
4
+ import geoip2.database
5
+
4
6
  current_dir = os.path.dirname(__file__)
5
7
  parse_path = os.path.join(current_dir, '..', 'assets', 'arkimeparse.js')
8
+ geo_path = os.path.join(current_dir, '..', 'assets', 'GeoLite2-City.mmdb')
6
9
 
7
10
 
8
11
  def parse_expression(expression):
@@ -12,3 +15,7 @@ def parse_expression(expression):
12
15
  return ctx.call("parse_exp", expression)
13
16
  else:
14
17
  return None
18
+
19
+
20
+ def geo_reader():
21
+ return geoip2.database.Reader(geo_path)
@@ -1,10 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xbase-util
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: 网络安全基础工具
5
5
  Author: xyt
6
6
  Author-email: 2506564278@qq.com
7
7
  License: <MIT License>
8
- Requires-Dist: PyExecJS==1.5.1
9
8
 
10
9
  包含提取,预测,训练的基础工具
@@ -6,7 +6,6 @@ xbase_util.egg-info/PKG-INFO
6
6
  xbase_util.egg-info/SOURCES.txt
7
7
  xbase_util.egg-info/dependency_links.txt
8
8
  xbase_util.egg-info/not-zip-safe
9
- xbase_util.egg-info/requires.txt
10
9
  xbase_util.egg-info/top_level.txt
11
- xbase_util/../assets/GeoLite2-City.mmdb
12
- xbase_util/../assets/arkimeparse.js
10
+ xbase_util/../xbase_util_assets/GeoLite2-City.mmdb
11
+ xbase_util/../xbase_util_assets/arkimeparse.js
@@ -1 +0,0 @@
1
- PyExecJS==1.5.1
File without changes
File without changes