opencloning 0.5.0.1__py3-none-any.whl → 0.5.1__py3-none-any.whl

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.
@@ -130,8 +130,8 @@ async def request_from_snapgene(plasmid_set: dict, plasmid_name: str) -> Dseqrec
130
130
  async def request_from_addgene(repository_id: str) -> Dseqrecord:
131
131
 
132
132
  url = f'https://www.addgene.org/{repository_id}/sequences/'
133
- async with get_http_client() as client:
134
- resp = await client.get(url)
133
+ async with get_http_client() as addgene_client:
134
+ resp = await addgene_client.get(url)
135
135
  if resp.status_code == 404:
136
136
  raise HTTPException(404, 'wrong addgene id')
137
137
  soup = BeautifulSoup(resp.content, 'html.parser')
@@ -151,7 +151,14 @@ async def request_from_addgene(repository_id: str) -> Dseqrecord:
151
151
  404,
152
152
  f'The requested plasmid does not have full sequences, see https://www.addgene.org/{repository_id}/sequences/',
153
153
  )
154
- dseqr = (await get_sequences_from_file_url(sequence_file_url))[0]
154
+
155
+ async with get_http_client() as addgene_client:
156
+ # For media.addgene.org URLs, we need to first visit www.addgene.org
157
+ # to get the authentication cookie (__Secure_media_edge_auth)
158
+ await addgene_client.get('https://www.addgene.org/', follow_redirects=True)
159
+
160
+ dseqr = (await get_sequences_from_file_url(sequence_file_url, get_function=addgene_client.get))[0]
161
+
155
162
  dseqr.name = plasmid_name
156
163
  dseqr.source = AddgeneIdSource(
157
164
  repository_id=repository_id,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opencloning
3
- Version: 0.5.0.1
3
+ Version: 0.5.1
4
4
  Summary: Backend of OpenCloning, a web application to generate molecular cloning strategies in json format, and share them with others.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -22,7 +22,7 @@ opencloning/catalogs/openDNA_collections.yaml,sha256=JPnPLJd9ynJkqJAumu0f7-E5E0W
22
22
  opencloning/catalogs/readme.txt,sha256=SPBPLfqszGH0zl7EZYddNwi9nE90or82o8aHNMscSkw,87
23
23
  opencloning/catalogs/seva.tsv,sha256=FFGZDDgsExYke1S0g_KCzM5YL680_RS-1XNEJbiqFJo,16125
24
24
  opencloning/catalogs/snapgene.yaml,sha256=Zi0i4l9KBOhoHnr7i2nYWD58IIYgBbEaNF5m4qzm2ks,47359
25
- opencloning/dna_functions.py,sha256=vyy2UDyYj3IfVmWf1z07j8T7D53JM-wFQFawcLzZt-k,15967
25
+ opencloning/dna_functions.py,sha256=nxWufh-cnFaffl13tlXE-jrdNWUcPjCX5ez5QMnudgM,16306
26
26
  opencloning/dna_utils.py,sha256=n_XRBr9xeEQSoMUWdgH7UigZN2KtU7AxmIwW18aFQdY,6814
27
27
  opencloning/ebic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  opencloning/ebic/primer_design.py,sha256=e_PkEhnlkeV7D3iCeDL8s1p-FkNWj17zWNaq-x9Uz8E,3149
@@ -45,7 +45,7 @@ opencloning/pydantic_models.py,sha256=cKXRHQyPdQDxkdzEwKgwvmQy0UjFjDVFR-eKIsBSZb
45
45
  opencloning/request_examples.py,sha256=rg-v9a5ttzwu5tKY5h3tiT_kVkIZOicS8c01MxrEcEY,2653
46
46
  opencloning/temp_functions.py,sha256=wRh26uW_JT9sy3070jIizTT82CE_hS8-GRW3vXEd1GQ,2029
47
47
  opencloning/utils.py,sha256=0Lvw1h1AsUJTK2b9mNzYVi_DBeWmWCFA5dIPl_gERcI,1479
48
- opencloning-0.5.0.1.dist-info/METADATA,sha256=ytZwNVKgGh236RRuKqOPNiCJ4aIHferfBCwej0HlSIg,9505
49
- opencloning-0.5.0.1.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
50
- opencloning-0.5.0.1.dist-info/licenses/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
51
- opencloning-0.5.0.1.dist-info/RECORD,,
48
+ opencloning-0.5.1.dist-info/METADATA,sha256=INHUNhEHznipdtJzmZLLP_pIRNs1ITtHW4PpRUJtyX8,9503
49
+ opencloning-0.5.1.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
50
+ opencloning-0.5.1.dist-info/licenses/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
51
+ opencloning-0.5.1.dist-info/RECORD,,