--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5b89eee2-b69e-f35b-4a8f-ac3bbb362cda%40yandex.com.
For more options, visit https://groups.google.com/d/optout.
Did you try doing this and see what happens?
On 23 Jan 2018 9:56 PM, "Etienne Robillard" <tka...@yandex.com> wrote:
Can I create a file named libdjango.pyx with the following code:
{{{
import django
from django import *
}}}
Then compile the C file with gcc to access django in C ?
Etienne
Le 2018-01-23 à 04:32, Etienne Robillard a écrit :
Hi,
I would like to know if it would be possible to autogenerate C bindings for the whole Django package in Cython or similar extension.
What do you think? :)
Cheers,
Etienne
--
Etienne Robillard
tka...@yandex.com
https://www.isotopesoftware.ca/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b6a19d7d-940b-4855-ab74-96f0e30b75fd%40googlegroups.com.
I'm curious about this to, but am struggling to see the use case for this. Could you elaborate on how you'd use something like this, and its expected benefits?
The goal would be to use faster C code for accessing Django
internal api.
Then I suppose you could build precompiled a Django binary for
specific architectures/compilers (like llvm) :)
Here is my results so far:
erob@marina:~/src/django-hotsauce-devel$ python
Python 2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>> import libdjango
>>> libdjango
<module 'libdjango' from '/home/erob/src/django-hotsauce-devel/lib/libdjango/__init__.pyc'>
>>> dir(libdjango)
['__builtins__', '__doc__', '__file__', '__name__', '__package__',
'__path__']
>>> libdjango.main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'main'
>>> import libdjango.main
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dynamic module does not define init function
(initmain)
erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat
libdjango.pxd
from django import *
erob@marina:~/src/django-hotsauce-devel/lib/libdjango$ cat
libdjango.pyx
from libdjango cimport *
Any ideas why the dynamic module does not define init function?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9210f6ce-e01c-423f-a1a7-1eae6fe596a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Etienne Robillard tka...@yandex.com https://www.isotopesoftware.ca/
Is it possible to wrap Django API into public C methods in
Cython?
--
You received this message because you are subscribed to the Google Groups "Django hotsauce" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-hotsau...@googlegroups.com.
To post to this group, send email to django-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-hotsauce/99d0931e-2a14-c977-5519-6bcac70637c0%40yandex.com.
For more options, visit https://groups.google.com/d/optout.