File tree 3 files changed +11
-2
lines changed
3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change
1
+ 0.3.1
Original file line number Diff line number Diff line change
1
+ import os
1
2
import platform
2
3
import sys
3
4
from typing import List , Optional
@@ -19,7 +20,9 @@ class ScrapingAntClient:
19
20
def __init__ (self , token : str ):
20
21
self .token = token
21
22
self .requests_session = requests .Session ()
22
- user_agent = f'ScrapingAntClient ({ sys .platform } ; Python/{ platform .python_version ()} );'
23
+ version_file = open (os .path .join ('scrapingant_client' , 'VERSION' ))
24
+ version = version_file .read ().strip ()
25
+ user_agent = f'ScrapingAnt Client/{ version } ({ sys .platform } ; Python/{ platform .python_version ()} );'
23
26
self .requests_session .headers .update ({
24
27
'x-api-key' : self .token ,
25
28
'User-Agent' : user_agent ,
Original file line number Diff line number Diff line change
1
+ import os
2
+
1
3
import setuptools
2
4
3
5
with open ("README.md" , "r" , encoding = "utf-8" ) as fh :
4
6
long_description = fh .read ()
5
7
8
+ version_file = open (os .path .join ('scrapingant_client' , 'VERSION' ))
9
+ version = version_file .read ().strip ()
10
+
6
11
setuptools .setup (
7
12
name = "scrapingant-client" ,
8
- version = "0.3.0" ,
13
+ version = version ,
9
14
author = "andrii.kovalenko" ,
10
15
11
16
license = 'Apache-2.0' ,
You can’t perform that action at this time.
0 commit comments