workspace stringclasses 1
value | channel stringclasses 1
value | sentences stringlengths 1 3.93k | ts stringlengths 26 26 | user stringlengths 2 11 | sentence_id stringlengths 44 53 | timestamp float64 1.5B 1.56B | __index_level_0__ int64 0 106k |
|---|---|---|---|---|---|---|---|
pythondev | help | What do you mean? Why use that methodology or why is it called that? | 2017-10-19T17:05:23.000130 | Antionette | pythondev_help_Antionette_2017-10-19T17:05:23.000130 | 1,508,432,723.00013 | 97,603 |
pythondev | help | nvm I guess I just want ROUND_HALF_UP | 2017-10-19T17:05:29.000585 | Alonso | pythondev_help_Alonso_2017-10-19T17:05:29.000585 | 1,508,432,729.000585 | 97,604 |
pythondev | help | Ah yes, that matches what your original description was, I was naming what you called the "default" | 2017-10-19T17:06:15.000239 | Antionette | pythondev_help_Antionette_2017-10-19T17:06:15.000239 | 1,508,432,775.000239 | 97,605 |
pythondev | help | I have been staring at this for too long | 2017-10-19T17:06:30.000156 | Alonso | pythondev_help_Alonso_2017-10-19T17:06:30.000156 | 1,508,432,790.000156 | 97,606 |
pythondev | help | just simply glanced over what I needed 20 times | 2017-10-19T17:06:48.000027 | Alonso | pythondev_help_Alonso_2017-10-19T17:06:48.000027 | 1,508,432,808.000027 | 97,607 |
pythondev | help | The descriptions are definitely a bit technical/wordy | 2017-10-19T17:07:07.000314 | Antionette | pythondev_help_Antionette_2017-10-19T17:07:07.000314 | 1,508,432,827.000314 | 97,608 |
pythondev | help | thanks for being my rubber duck :slightly_smiling_face: | 2017-10-19T17:08:01.000318 | Alonso | pythondev_help_Alonso_2017-10-19T17:08:01.000318 | 1,508,432,881.000318 | 97,609 |
pythondev | help | no problem! :rubberduck: | 2017-10-19T17:08:43.000248 | Antionette | pythondev_help_Antionette_2017-10-19T17:08:43.000248 | 1,508,432,923.000248 | 97,610 |
pythondev | help | round half even is generally considered more 'fair' than 5-9 round up, 0-4 round down | 2017-10-19T17:58:04.000094 | Sirena | pythondev_help_Sirena_2017-10-19T17:58:04.000094 | 1,508,435,884.000094 | 97,611 |
pythondev | help | due to things like <https://en.wikipedia.org/wiki/Benford%27s_law> | 2017-10-19T17:59:39.000044 | Sirena | pythondev_help_Sirena_2017-10-19T17:59:39.000044 | 1,508,435,979.000044 | 97,612 |
pythondev | help | ```
def somefunc():
try:
subprocess.run() # This will crash
except subprocess.CalledProcessError:
logging.error('Oh oh...')
try:
somefunc()
except Exception as e:
logging.exception(e)
```
Will both loggings be recorded with this structure? I ran something similar to the above and only got the outermost exception logged, and I can't see any obvious faults so far. | 2017-10-20T07:51:29.000145 | Scot | pythondev_help_Scot_2017-10-20T07:51:29.000145 | 1,508,485,889.000145 | 97,613 |
pythondev | help | my guess is you’re not catching the right exception in the function | 2017-10-20T07:55:11.000021 | Meg | pythondev_help_Meg_2017-10-20T07:55:11.000021 | 1,508,486,111.000021 | 97,614 |
pythondev | help | <@Scot> according to <https://docs.python.org/3/library/subprocess.html#subprocess.run> you need to specify `check=True` if you want subprocess to raise `CalledProcessError`. You don't specify `check=True`, so the except clause within `somefunc` doesn't catch anything | 2017-10-20T07:55:12.000098 | Collette | pythondev_help_Collette_2017-10-20T07:55:12.000098 | 1,508,486,112.000098 | 97,615 |
pythondev | help | Ah, that might be it, thanks | 2017-10-20T07:55:29.000099 | Scot | pythondev_help_Scot_2017-10-20T07:55:29.000099 | 1,508,486,129.000099 | 97,616 |
pythondev | help | yep, good call | 2017-10-20T07:55:58.000440 | Meg | pythondev_help_Meg_2017-10-20T07:55:58.000440 | 1,508,486,158.00044 | 97,617 |
pythondev | help | >If check is true, and the process exits with a non-zero exit code, a CalledProcessError exception will be raised. Attributes of that exception hold the arguments, the exit code, and stdout and stderr if they were captured. | 2017-10-20T07:56:00.000227 | Meg | pythondev_help_Meg_2017-10-20T07:56:00.000227 | 1,508,486,160.000227 | 97,618 |
pythondev | help | <@Graciela> go for it. It's <#C07EFMZ1N|help> after all :slightly_smiling_face: | 2017-10-20T08:02:37.000386 | Collette | pythondev_help_Collette_2017-10-20T08:02:37.000386 | 1,508,486,557.000386 | 97,619 |
pythondev | help | sorry, _je ne parle pas haskell_ :smile: | 2017-10-20T08:08:59.000035 | Meg | pythondev_help_Meg_2017-10-20T08:08:59.000035 | 1,508,486,939.000035 | 97,620 |
pythondev | help | hey everyone | 2017-10-20T10:23:23.000485 | Analisa | pythondev_help_Analisa_2017-10-20T10:23:23.000485 | 1,508,495,003.000485 | 97,621 |
pythondev | help | made a python project if yall want to check it out | 2017-10-20T10:23:30.000554 | Analisa | pythondev_help_Analisa_2017-10-20T10:23:30.000554 | 1,508,495,010.000554 | 97,622 |
pythondev | help | computer vs computer | 2017-10-20T10:23:33.000370 | Analisa | pythondev_help_Analisa_2017-10-20T10:23:33.000370 | 1,508,495,013.00037 | 97,623 |
pythondev | help | rock paper scissors | 2017-10-20T10:23:39.000104 | Analisa | pythondev_help_Analisa_2017-10-20T10:23:39.000104 | 1,508,495,019.000104 | 97,624 |
pythondev | help | <http://www.codeskulptor.org/#user43_Z8dkyfm1Jx_1.py> | 2017-10-20T10:23:59.000292 | Analisa | pythondev_help_Analisa_2017-10-20T10:23:59.000292 | 1,508,495,039.000292 | 97,625 |
pythondev | help | <@Analisa>, great course to start off learning python! | 2017-10-20T10:26:59.000171 | Winnifred | pythondev_help_Winnifred_2017-10-20T10:26:59.000171 | 1,508,495,219.000171 | 97,626 |
pythondev | help | I would ask for more specific feedback though when requesting help. | 2017-10-20T10:27:48.000279 | Winnifred | pythondev_help_Winnifred_2017-10-20T10:27:48.000279 | 1,508,495,268.000279 | 97,627 |
pythondev | help | I appreciate the `spock` option :spock-hand: | 2017-10-20T10:33:44.000029 | Sparkle | pythondev_help_Sparkle_2017-10-20T10:33:44.000029 | 1,508,495,624.000029 | 97,628 |
pythondev | help | I like star wars too :wink: | 2017-10-20T10:35:10.000569 | Suellen | pythondev_help_Suellen_2017-10-20T10:35:10.000569 | 1,508,495,710.000569 | 97,629 |
pythondev | help | Could anyone give me some clues if there is an easy way to create and manipulate this object?
<https://github.com/kubernetes-incubator/client-python/blob/master/kubernetes/docs/V1beta1Ingress.md> | 2017-10-20T11:10:43.000150 | Kiera | pythondev_help_Kiera_2017-10-20T11:10:43.000150 | 1,508,497,843.00015 | 97,630 |
pythondev | help | Instantiating the object seems easy: `body = client.V1beta1Ingress` | 2017-10-20T11:12:21.000432 | Kiera | pythondev_help_Kiera_2017-10-20T11:12:21.000432 | 1,508,497,941.000432 | 97,631 |
pythondev | help | what's the top notch website for python exercises ? | 2017-10-20T12:05:44.000495 | Christel | pythondev_help_Christel_2017-10-20T12:05:44.000495 | 1,508,501,144.000495 | 97,632 |
pythondev | help | What kind of exercises ? <https://www.codewars.com/> in fun for challenges and you get to compare your solution with others' | 2017-10-20T12:07:39.000376 | Lorenza | pythondev_help_Lorenza_2017-10-20T12:07:39.000376 | 1,508,501,259.000376 | 97,633 |
pythondev | help | Do strings in yamls have a length limit? | 2017-10-20T12:36:09.000282 | Adrianne | pythondev_help_Adrianne_2017-10-20T12:36:09.000282 | 1,508,502,969.000282 | 97,634 |
pythondev | help | hackerrank is good too | 2017-10-20T13:13:42.000135 | Suellen | pythondev_help_Suellen_2017-10-20T13:13:42.000135 | 1,508,505,222.000135 | 97,635 |
pythondev | help | they have quite a lot of exercises ranging from very simple to quite complex | 2017-10-20T13:14:03.000624 | Suellen | pythondev_help_Suellen_2017-10-20T13:14:03.000624 | 1,508,505,243.000624 | 97,636 |
pythondev | help | zero or more suggests that no, there is no limit | 2017-10-20T13:16:30.000329 | Suellen | pythondev_help_Suellen_2017-10-20T13:16:30.000329 | 1,508,505,390.000329 | 97,637 |
pythondev | help | although you might have a case where a parser isn't fully conforming to the spec | 2017-10-20T13:16:55.000089 | Suellen | pythondev_help_Suellen_2017-10-20T13:16:55.000089 | 1,508,505,415.000089 | 97,638 |
pythondev | help | great question! | 2017-10-20T13:29:09.000086 | Analisa | pythondev_help_Analisa_2017-10-20T13:29:09.000086 | 1,508,506,149.000086 | 97,639 |
pythondev | help | I like <https://pybit.es/> | 2017-10-20T13:47:42.000320 | Mirian | pythondev_help_Mirian_2017-10-20T13:47:42.000320 | 1,508,507,262.00032 | 97,640 |
pythondev | help | I don't think so | 2017-10-20T13:49:15.000481 | Mirian | pythondev_help_Mirian_2017-10-20T13:49:15.000481 | 1,508,507,355.000481 | 97,641 |
pythondev | help | ```import yaml
# Python will suck up all your memory unless you have more than 64GB for a sting
# My memory size is 16GB so 1024 KB * 1024 MB * 16 GB = max bytes I can use
MAX_PYTHON_SIZE = 1024 * 1024 * 16
my_d = {"MYKEY": "SOMEVAL"}
if __name__ == '__main__':
while len(my_d["MYKEY"]) < MAX_PYTHON_SIZE:
print "Val length: {0}".format(len(my_d["MYKEY"]))
with open('test.yml', 'w') as fp:
yaml.dump(my_d, fp)
with open('test.yml', 'r') as fp:
my_d = yaml.load(fp)
print "Successful load"
my_d["MYKEY"] += my_d["MYKEY"]``` | 2017-10-20T14:55:44.000248 | Marcelina | pythondev_help_Marcelina_2017-10-20T14:55:44.000248 | 1,508,511,344.000248 | 97,642 |
pythondev | help | I was able to get this up to my memory size | 2017-10-20T14:56:02.000241 | Marcelina | pythondev_help_Marcelina_2017-10-20T14:56:02.000241 | 1,508,511,362.000241 | 97,643 |
pythondev | help | <@Adrianne> I think you would have a hard time hitting the memory limit | 2017-10-20T14:57:06.000295 | Marcelina | pythondev_help_Marcelina_2017-10-20T14:57:06.000295 | 1,508,511,426.000295 | 97,644 |
pythondev | help | time range, if the job is aborted | 2017-10-20T15:06:32.000260 | Kristi | pythondev_help_Kristi_2017-10-20T15:06:32.000260 | 1,508,511,992.00026 | 97,645 |
pythondev | help | i have a string thats wrapped on multiple lines. 950 characters. i get tag:yaml.org.2002:str error | 2017-10-20T15:06:41.000420 | Adrianne | pythondev_help_Adrianne_2017-10-20T15:06:41.000420 | 1,508,512,001.00042 | 97,646 |
pythondev | help | <@Marcelina> I have a 950 character string and the yaml passes linting but get a tag:yaml.org.2002:str error. so maybe a memory issue? | 2017-10-20T15:07:52.000185 | Adrianne | pythondev_help_Adrianne_2017-10-20T15:07:52.000185 | 1,508,512,072.000185 | 97,647 |
pythondev | help | this is the traceback: Traceback (most recent call last):
File "C:/Users/PerezE3/Documents/appworx-automation/testing.py", line 57, in <module>
main()
File "C:/Users/PerezE3/Documents/appworx-automation/testing.py", line 14, in main
find_time(begin_report, stop_report)
File "C:/Users/PerezE3/Documents/appworx-automation/testing.py", line 26, in find_time
if not start <= to_list[2] <= stop:
IndexError: list index out of range | 2017-10-20T15:08:18.000288 | Kristi | pythondev_help_Kristi_2017-10-20T15:08:18.000288 | 1,508,512,098.000288 | 97,648 |
pythondev | help | 950 chars should not be enough | 2017-10-20T15:08:22.000482 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:08:22.000482 | 1,508,512,102.000482 | 97,649 |
pythondev | help | Can you give me the full traceback? | 2017-10-20T15:08:32.000268 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:08:32.000268 | 1,508,512,112.000268 | 97,650 |
pythondev | help | And also `pip freeze | grep -i yaml` | 2017-10-20T15:09:36.000113 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:09:36.000113 | 1,508,512,176.000113 | 97,651 |
pythondev | help | And does the string have line breaks? | 2017-10-20T15:10:19.000286 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:10:19.000286 | 1,508,512,219.000286 | 97,652 |
pythondev | help | it does | 2017-10-20T15:10:37.000142 | Adrianne | pythondev_help_Adrianne_2017-10-20T15:10:37.000142 | 1,508,512,237.000142 | 97,653 |
pythondev | help | Can you PM me an abbreviated version of the yaml file? It's OK if it contains junk info. | 2017-10-20T15:11:06.000605 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:11:06.000605 | 1,508,512,266.000605 | 97,654 |
pythondev | help | <@Kristi> sounds like to_list doesn't have 3 elements. If you wanted the second element, you want index 1 since the first element is index 0. Is that maybe your issue? | 2017-10-20T15:14:52.000287 | Sirena | pythondev_help_Sirena_2017-10-20T15:14:52.000287 | 1,508,512,492.000287 | 97,655 |
pythondev | help | or possibly you have a line that doesn't match that format and ended up with a broken to_list object | 2017-10-20T15:16:05.000081 | Sirena | pythondev_help_Sirena_2017-10-20T15:16:05.000081 | 1,508,512,565.000081 | 97,656 |
pythondev | help | <@Sirena> the list should have 6 element and the one I am looking for is the number 2 starting from 0 which is the time stamp | 2017-10-20T15:17:12.000213 | Kristi | pythondev_help_Kristi_2017-10-20T15:17:12.000213 | 1,508,512,632.000213 | 97,657 |
pythondev | help | <@Sirena> maybe what you said about the line that doesn't match the format is the issue | 2017-10-20T15:18:37.000112 | Kristi | pythondev_help_Kristi_2017-10-20T15:18:37.000112 | 1,508,512,717.000112 | 97,658 |
pythondev | help | <@Sirena> thanks for point that out, do you know how I can fix that? | 2017-10-20T15:19:32.000241 | Kristi | pythondev_help_Kristi_2017-10-20T15:19:32.000241 | 1,508,512,772.000241 | 97,659 |
pythondev | help | yeah, try an
```if len(to_list) < 3:
print 'not enough elements'```
or something like that | 2017-10-20T15:19:44.000320 | Sirena | pythondev_help_Sirena_2017-10-20T15:19:44.000320 | 1,508,512,784.00032 | 97,660 |
pythondev | help | see if it prints a message to you | 2017-10-20T15:19:52.000159 | Sirena | pythondev_help_Sirena_2017-10-20T15:19:52.000159 | 1,508,512,792.000159 | 97,661 |
pythondev | help | trouble shoot from there, probably just bad input | 2017-10-20T15:20:10.000040 | Sirena | pythondev_help_Sirena_2017-10-20T15:20:10.000040 | 1,508,512,810.00004 | 97,662 |
pythondev | help | yes you are right, I put this if len(to_list) < 3:
continue | 2017-10-20T15:21:38.000322 | Kristi | pythondev_help_Kristi_2017-10-20T15:21:38.000322 | 1,508,512,898.000322 | 97,663 |
pythondev | help | and it works now, thanks a lot <@Sirena> | 2017-10-20T15:22:22.000182 | Kristi | pythondev_help_Kristi_2017-10-20T15:22:22.000182 | 1,508,512,942.000182 | 97,664 |
pythondev | help | is that the behavior you want? seems risky to just skip bad input unless you are pretty certain what is going on under the covers there | 2017-10-20T15:23:00.000258 | Sirena | pythondev_help_Sirena_2017-10-20T15:23:00.000258 | 1,508,512,980.000258 | 97,665 |
pythondev | help | <@Sirena> I did it because I know that the logs files that I need always have the same information, so if I find anything that do not match with that criteria I can skipped. The lines that contain less that 3 items were titles around the file. | 2017-10-20T15:28:04.000314 | Kristi | pythondev_help_Kristi_2017-10-20T15:28:04.000314 | 1,508,513,284.000314 | 97,666 |
pythondev | help | <@Kristi> okey dokey. Glad it worked out then. | 2017-10-20T15:30:13.000196 | Sirena | pythondev_help_Sirena_2017-10-20T15:30:13.000196 | 1,508,513,413.000196 | 97,667 |
pythondev | help | What Active Directory modules are out there? I'm trying to use PyAD and not having much luck. Wondering if there are other more robust implementations out there. | 2017-10-20T15:32:18.000304 | Dorris | pythondev_help_Dorris_2017-10-20T15:32:18.000304 | 1,508,513,538.000304 | 97,668 |
pythondev | help | I've used <http://ldap3.readthedocs.io/> in the past | 2017-10-20T15:46:12.000170 | Marcelina | pythondev_help_Marcelina_2017-10-20T15:46:12.000170 | 1,508,514,372.00017 | 97,669 |
pythondev | help | ‘count = 0
def square(x):
global count
count += 1
return x**2
print square(square(square(square(3))))’ | 2017-10-20T16:22:33.000187 | Analisa | pythondev_help_Analisa_2017-10-20T16:22:33.000187 | 1,508,516,553.000187 | 97,670 |
pythondev | help | hey all | 2017-10-20T16:22:38.000372 | Analisa | pythondev_help_Analisa_2017-10-20T16:22:38.000372 | 1,508,516,558.000372 | 97,671 |
pythondev | help | not sure how to put code in - can anyone explain why x = 3 on the first execution of square? | 2017-10-20T16:23:06.000352 | Analisa | pythondev_help_Analisa_2017-10-20T16:23:06.000352 | 1,508,516,586.000352 | 97,672 |
pythondev | help | ahh found it | 2017-10-20T16:26:50.000528 | Analisa | pythondev_help_Analisa_2017-10-20T16:26:50.000528 | 1,508,516,810.000528 | 97,673 |
pythondev | help | ```'count = 0
def square(x):
global count
count += 1
return x**2
print square(square(square(square(3))))``` | 2017-10-20T16:26:57.000283 | Analisa | pythondev_help_Analisa_2017-10-20T16:26:57.000283 | 1,508,516,817.000283 | 97,674 |
pythondev | help | You're calling the `square` function with `square(3)`, this passes 3 into the function as the `x` argument of `def square(x)` | 2017-10-20T16:28:00.000147 | Antionette | pythondev_help_Antionette_2017-10-20T16:28:00.000147 | 1,508,516,880.000147 | 97,675 |
pythondev | help | so literally, I start with x = 3 | 2017-10-20T16:30:12.000017 | Analisa | pythondev_help_Analisa_2017-10-20T16:30:12.000017 | 1,508,517,012.000017 | 97,676 |
pythondev | help | per the argument of square | 2017-10-20T16:30:15.000345 | Analisa | pythondev_help_Analisa_2017-10-20T16:30:15.000345 | 1,508,517,015.000345 | 97,677 |
pythondev | help | or rather, the print statement executes based off of the assignment x = 3 | 2017-10-20T16:30:39.000318 | Analisa | pythondev_help_Analisa_2017-10-20T16:30:39.000318 | 1,508,517,039.000318 | 97,678 |
pythondev | help | <@Analisa> this might be helpful -> <https://goo.gl/7LMdUA> (play with forward and back buttons and see what happens there :slightly_smiling_face: ) | 2017-10-20T16:30:58.000151 | Mirian | pythondev_help_Mirian_2017-10-20T16:30:58.000151 | 1,508,517,058.000151 | 97,679 |
pythondev | help | oh thats a cool tool | 2017-10-20T16:31:38.000182 | Analisa | pythondev_help_Analisa_2017-10-20T16:31:38.000182 | 1,508,517,098.000182 | 97,680 |
pythondev | help | This is probably less helpful but perhaps still interesting, here is the main documentation for defining a function | 2017-10-20T16:34:39.000297 | Antionette | pythondev_help_Antionette_2017-10-20T16:34:39.000297 | 1,508,517,279.000297 | 97,681 |
pythondev | help | <https://docs.python.org/3/tutorial/controlflow.html#defining-functions> | 2017-10-20T16:34:39.000494 | Antionette | pythondev_help_Antionette_2017-10-20T16:34:39.000494 | 1,508,517,279.000494 | 97,682 |
pythondev | help | Notably this paragraph about function arguments | 2017-10-20T16:35:05.000566 | Antionette | pythondev_help_Antionette_2017-10-20T16:35:05.000566 | 1,508,517,305.000566 | 97,683 |
pythondev | help | this is awesome | 2017-10-20T16:36:14.000479 | Analisa | pythondev_help_Analisa_2017-10-20T16:36:14.000479 | 1,508,517,374.000479 | 97,684 |
pythondev | help | I’ll be sure to read the docs, I think I understand now | 2017-10-20T16:36:24.000289 | Analisa | pythondev_help_Analisa_2017-10-20T16:36:24.000289 | 1,508,517,384.000289 | 97,685 |
pythondev | help | thanks for the help! | 2017-10-20T16:36:42.000168 | Analisa | pythondev_help_Analisa_2017-10-20T16:36:42.000168 | 1,508,517,402.000168 | 97,686 |
pythondev | help | Is there some functionality in sqlalchemy that will take some given Class and convert it to the form it wants?
or is there some module to do that for me? | 2017-10-21T11:36:38.000093 | Winnie | pythondev_help_Winnie_2017-10-21T11:36:38.000093 | 1,508,585,798.000093 | 97,687 |
pythondev | help | <https://wtforms-alchemy.readthedocs.io/en/latest/introduction.html> | 2017-10-21T11:37:52.000038 | Collette | pythondev_help_Collette_2017-10-21T11:37:52.000038 | 1,508,585,872.000038 | 97,688 |
pythondev | help | <@Collette> huh? | 2017-10-21T11:38:44.000092 | Winnie | pythondev_help_Winnie_2017-10-21T11:38:44.000092 | 1,508,585,924.000092 | 97,689 |
pythondev | help | I'm not sure how should I respond to that | 2017-10-21T11:40:40.000115 | Collette | pythondev_help_Collette_2017-10-21T11:40:40.000115 | 1,508,586,040.000115 | 97,690 |
pythondev | help | I don't understand what the aim of your link is | 2017-10-21T11:41:06.000064 | Winnie | pythondev_help_Winnie_2017-10-21T11:41:06.000064 | 1,508,586,066.000064 | 97,691 |
pythondev | help | maybe you misunderstood me, I'm not looking for forms
I have an existing Class, and I'd like to port it to how sqlalchemy wants it
is there something that will automate that for me? | 2017-10-21T11:42:28.000058 | Winnie | pythondev_help_Winnie_2017-10-21T11:42:28.000058 | 1,508,586,148.000058 | 97,692 |
pythondev | help | Okay?.. You want to generate a `sqlalchemy.orm` model based on some arbitrary class attributes? | 2017-10-21T11:44:41.000091 | Collette | pythondev_help_Collette_2017-10-21T11:44:41.000091 | 1,508,586,281.000091 | 97,693 |
pythondev | help | those sound like the appropriate words | 2017-10-21T11:45:04.000141 | Winnie | pythondev_help_Winnie_2017-10-21T11:45:04.000141 | 1,508,586,304.000141 | 97,694 |
pythondev | help | <http://docs.sqlalchemy.org/en/latest/orm/extensions/automap.html> You could use something like this to just take it from the db, otherwise it might be simpler to just create the class | 2017-10-21T11:47:57.000016 | Vita | pythondev_help_Vita_2017-10-21T11:47:57.000016 | 1,508,586,477.000016 | 97,695 |
pythondev | help | <@Winnie> everything is possible in python, but that would require a lot of hackery hacks. Why do you want to do that? What's your use-case? | 2017-10-21T11:49:31.000072 | Collette | pythondev_help_Collette_2017-10-21T11:49:31.000072 | 1,508,586,571.000072 | 97,696 |
pythondev | help | Or that's a purely theoretical question? | 2017-10-21T11:49:41.000066 | Collette | pythondev_help_Collette_2017-10-21T11:49:41.000066 | 1,508,586,581.000066 | 97,697 |
pythondev | help | You'll basically need to re-implement <https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/ext/automap.py> to use a python class instead of a database | 2017-10-21T11:51:48.000069 | Collette | pythondev_help_Collette_2017-10-21T11:51:48.000069 | 1,508,586,708.000069 | 97,698 |
pythondev | help | <@Vita> the db doesn't exist yet
<@Collette> my use case is that my project consists of a scraper that stores its data as objects, but I want to persist those using a db
All the classes already exist, but from what I understand, if I want them to be compatible with sqlalchemy, I'd have to essentially re-write them | 2017-10-21T11:58:31.000112 | Winnie | pythondev_help_Winnie_2017-10-21T11:58:31.000112 | 1,508,587,111.000112 | 97,699 |
pythondev | help | Well, no. DB models can, but really shouldn't map directly to objects. How would you declare relationships without writing them manually, for instance? | 2017-10-21T11:59:59.000009 | Collette | pythondev_help_Collette_2017-10-21T11:59:59.000009 | 1,508,587,199.000009 | 97,700 |
pythondev | help | When you write DB models, you model your database. That's something orthogonal to how you store data in memory. | 2017-10-21T12:00:45.000025 | Collette | pythondev_help_Collette_2017-10-21T12:00:45.000025 | 1,508,587,245.000025 | 97,701 |
pythondev | help | well It could be smart and see that classes as fields are just links to another table | 2017-10-21T12:02:22.000034 | Winnie | pythondev_help_Winnie_2017-10-21T12:02:22.000034 | 1,508,587,342.000034 | 97,702 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.