Giter VIP home page Giter VIP logo

django-csvimport's Introduction

Django CSV Import

Ed Crewe - December 2023

Overview

django-csvimport is a generic importer tool to allow the upload of CSV files for populating data. The egg installs an admin csvimport model that has a file upload field. Add a new csvimport and upload a comma separated values file or MS Excel file.

The upload triggers the import mechanism which matches the header line of the files field names to the fields in the selected model. Importing any rows that include all required fields. Optionally required fields can be specified as part of the upload. By default duplicate value rows are not inserted.

The import can also be run as a custom command, ie manage.py importcsv filename for possible use via cronjob etc.

For CSV files import where their schema is unknown, and there is no existing model to import to, there is another command, inspectcsv, to generate the model code from the CSV file, guessing data types from the data using code from https://messytables.readthedocs.org

The core import code was based on http://djangosnippets.org/snippets/633/ by Jonathan Holst. It adds character encoding handling, model field and column autodetection, admin interface, custom command etc.

Version 3 - Dec 2023

  1. Test with Django 5 and Python 3.12
  2. Incorporate messytables relevant code, the types.py file, since its no longer supported for Python 3.12
  3. Use dateparser for auto-handling a much wider range of date formats

Version 2 - Sept 2014

  1. New management command csvinspect to generate models from CSV files
  2. General code refactor
  3. Management command renamed from csvimport to importcsv
  4. More features to cope with bad encoding and date types

Version Compatibility

  • version 3.0 tested with Django 5.0 Python 3.12
  • version 2.16 tested with Django 3.2.16 on Python 3.9.6
  • version 2.14 tested with Django 3.0.5 on Python 3.7.6, 3.8.2
  • version 2.13 was tested with Django 2.2.5 on Python 3.7.3
  • version 2.6 was tested with Django 1.7, 1.8, 1.9, 1.10, 1.11 on Python 2.7.13, Python 3.5.6

Please use version 2.1, eg. pip install django-csvimport==2.1 for Django versions prior to 1.7

This Django >= 1.7 requirement is because django-csvimport uses the newly added AppConfig for versions > 2.1 (NB: To fix this issue you could install django-appconf to django 1.6 or earlier and tweak csvimport to use it in csvimport.app)

For really old Django versions < 1.4 you may have to dial back the versions until it works!

Note that only versions > 2.2 are compatible with Python 3.4

Installation instructions

Add the following to the INSTALLED_APPS in the settings.py of your project:

>>> pip install django-csvimport ... ... INSTALLED_APPS = ( ... ... ... 'csvimport.app.CSVImportConf', # use AppConfig for django >=1.7 csvimport >=2.2 ... ) ... ... python manage.py migrate (or syncdb if django < 1.9)

Note that migrate has the core tables in 0001_initial migration and test tables in 0002 so rm migrations/0002_test_models.py if you do not want these cluttering your database

Custom commands

INSPECTCSV

manage.py inspectcsv importfile.csv > models.py

This returns the code for a new models file with a guesstimated model for the CSV file. Add it to your app then run

>>> makemigrations your_app >>> migrate

You can then run the import to that model for importfile.csv

NB: As it says its a guesstimate, you may have to manually tweak the generated models.py to get the import to work better.

If there are no headings in the CSV file, then it just uses automated ones col_1, col_2 ... etc.

IMPORTCSV

(Please note this command used to be csvimport but that caused name clash issues with the module)

manage.py importcsv --mappings='' --model='app_label.model_name' --delimiter='t' importfile.csv

For mappings enter a list of fields in order only if you dont have a header row with matching field names - or you want to override it, eg.

--mappings = '1=shared_code,2=org(otherapp.Organisation|name),3=date'

where (model|foreign key field) is used to specify relations if again, you want to override what would be looked up from your models.

If you have no real field names in your csv file, then you can use --mappings='none' and it will assume the fields are named col_1, col_2 ... etc.

Note that if you have a header row and specify mappings then it will treat the header as a data row, so delete it first.

Admin interface import

Just add a csvimport item, fill in the form and submit. Failed import rows are added to the log field.

Demonstration installation instructions

To see how it works, you can install a demo easily enough eg. via virtual environment, then use the tests settings to have some sample models for importing data, and the fixtures are sample csv files.

  • Run the following in your shell:

>>> virtualenv mysite ... cd mysite ... pip install django ... pip install django-csvimport ... ... cat > bin/django-admin.py << EOF ... #!/usr/bin/env python ... from django.core import management ... import os ... os.environ["DJANGO_SETTINGS_MODULE"] = "csvimport.settings" ... if __name__ == "__main__": ... management.execute_from_command_line() ... EOF ... ... django-admin.py migrate ... django-admin.py runserver

  • Go to http://127.0.0.1:8000/admin/ in your browser - pay attention to the trailing / !
  • Click on add Csvimport
  • Pick the django-csvimport/csvimport/tests/fixtures/countries.csv [1] and upload it
  • Check to see if the Country model is now populated.

[1] also available from https://raw.github.com/edcrewe/django-importcsv/master/importcsv/tests/fixtures/countries.csv

Alternatively you can use the command line to upload

django-admin.py importcsv --model='csvimport.Country' django-csvimport/csvimport/tests/fixtures/countries.csv --settings='csvimport.settings'

Tests

To run the django-csvimport tests use:

>>> bin/python3 -m django test --settings='csvimport.settings' csvimport.tests

Foreign Keys

It is not viable for csvimport to determine complex table relations. However if it finds something marked as an ForeignKey with a lookup field in its model mappings, then it checks if the data exists already for the related model and pulls back an id for the field or creates a new entry if possible in the fkey model and pulls back a new id.

For this to be useful then you need a related table that has a unique and more meaningful field that is being used in your data than a numeric primary key.

eg. for an organisation column, org, that holds the unique name of the organisation from a separate table, you can add

column2=org(Organisation|name)

to the mappings, so it knows that the org field relates to a separate Organisation table with a unique name field to be used for it to lookup and replace with org_id FKey

More complex relations

For any more sophisticated relations, eg. multiple keys, many to many fields etc. The recommended approach is to create a temporary or intermediate import table that holds the data from your CSV file with the lookup data in as columns, you can use

inspectcsv importfile.csv > models.py

to automatically generate the import model from your CSV file.

Whenever you do an import to that table you would use a bulk insert database query to take the data in it and populate complex relations of the final model tables appropriately. If imports are happening repeatedly, eg. once a day, you retain your import CSV format table, and can add a database trigger for the table to automatically run your stored data conversion synchronisation query into the target tables.

DateTime data

Note that the importer uses dateparser to try to convert any datetime types you have in your CSV file. See https://dateparser.readthedocs.io/en/latest/settings.html for DATEPARSER_SETTINGS env variable as a JSON map.

Acknowledgements

This package was created as part of a django dash at the House of Omni, Bristol UK, organised by Dan Fairs and my local django users group, #DBBUG. It was a core component for an application for aid agency supply chain sharing, prompted by Fraser Stephens of the HELIOS foundation and developed by Ed Crewe and Tom Dunham.

Other Django CSV importers

django-csvimport's People

Contributors

adevore avatar bkaluza avatar blorenz avatar cjmabry avatar cwood avatar edcrewe avatar edouard-gv avatar elena avatar jowolf avatar kaizoku avatar kristjanr avatar legion80 avatar liwee avatar marcostack avatar microniko avatar mikoim avatar mtellezj avatar nnseva avatar smeyfroi avatar thatneat avatar valhallasw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-csvimport's Issues

Django 1.7

Is there any plan for updating this package to work with Django 1.7?

One issue django-csvimport having is for using django.models.loading, which has been deprecated.

list index out of range

Getting error list index out of range

1.8
IndexError
list index out of range
/app/.heroku/python/lib/python2.7/site-packages/csvimport/management/commands/importcsv.py in run, line 247
/app/.heroku/python/bin/python
2.7.13
['/app', '/app/.heroku/python/bin', '/app', '/app/.heroku/python/lib/python27.zip', '/app/.heroku/python/lib/python2.7', '/app/.heroku/python/lib/python2.7/plat-linux2', '/app/.heroku/python/lib/python2.7/lib-tk', '/app/.heroku/python/lib/python2.7/lib-old', '/app/.heroku/python/lib/python2.7/lib-dynload', '/app/.heroku/python/lib/python2.7/site-packages']

Skip first row?

How can I modify the code to allow myself to skip the first row of a file?

Bad import in importcsv.py

In the file /csvimport/management/commands.importcsv.py the import is:
from csvimport import CSVParser

Should be:
from csvimport.parser import CSVParser

The problem is visible in the version tagged 2.1

DATE_INPUT_FORMATS is now a list instead of a tuple (Django 1.9)

When attempting to import a CSV, I get a TypeError "can only concatenate list (not "tuple") to list". The Traceback shows that csvimport/management/commands/importcsv.py is attempting to perform this:

CSV_DATE_INPUT_FORMATS = DATE_INPUT_FORMATS + ('%d-%m-%Y', '%Y-%m-%d')

In Django 1.9, DATE_INPUT_FORMATS is a list, so this operation is invalid.

Bug with pypi install __init__.py not copied

Doh!

This was due to setup.py specifying csvimport as a namespace package and hence not adding the init.py file to that folder.
Django then expects an init file for the app to be imported OK, because it uses app.file in translation module.
So without the init there is no file property and it breaks django startup!

Anyhow delete the namespace line from setup.py to fix it.

Demonstration fails with TypeError when uploading

How to reproduce

Expected result

Confirmation and imported data

Actual result

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/admin/csvimport/csvimport/add/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'csvimport',
 'csvimport.tests']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  307.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  79.         response = view_func(request, *args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  197.             return view(request, *args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  28.             return bound_func(*args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  24.                 return func(self, *args2, **kwargs2)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  217.                 res = func(*args, **kwargs)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  882.                 self.save_model(request, new_object, form, change=False)
File "/home/valhallasw/src/mysite/local/lib/python2.7/site-packages/csvimport/admin.py" in save_model
  35.                       defaults=defaults)

Exception Type: TypeError at /admin/csvimport/csvimport/add/
Exception Value: setup() takes at least 4 arguments (5 given)

local variable 'endings' referenced before assignment

I tried uploading the django-csvimport/csvimport/tests/fixtures/countries.csv both, from the web app and command line

UnboundLocalError at /admin/csvimport/csvimport/add/
local variable 'endings' referenced before assignment
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/csvimport/csvimport/add/
Django Version: 1.9.8
Exception Type: UnboundLocalError
Exception Value:
local variable 'endings' referenced before assignment
Exception Location: /Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/csvimport/parser.py in open_csvfile, line 81
Python Executable: /Users/kristjan/env-kliendibaas/bin/python
Python Version: 3.5.2
Python Path:
['/Users/kristjan/PycharmProjects/kliendibaas',
'/Users/kristjan/env-kliendibaas/lib/python35.zip',
'/Users/kristjan/env-kliendibaas/lib/python3.5',
'/Users/kristjan/env-kliendibaas/lib/python3.5/plat-darwin',
'/Users/kristjan/env-kliendibaas/lib/python3.5/lib-dynload',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5',
'/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/plat-darwin',
'/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages']

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/csvimport/csvimport/add/

Django Version: 1.9.8
Python Version: 3.5.2
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',
'csvimport.app.CSVImportConf']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback:

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/contrib/admin/options.py" in wrapper
541. return self.admin_site.admin_view(view)(*args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapped_view
149. response = view_func(request, *args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/contrib/admin/sites.py" in inner
244. return view(request, *args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/contrib/admin/options.py" in add_view
1437. return self.changeform_view(request, None, form_url, extra_context)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapper
67. return bound_func(*args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/utils/decorators.py" in _wrapped_view
149. response = view_func(request, *args, **kwargs)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/utils/decorators.py" in bound_func
63. return func.get(self, type(self))(*args2, **kwargs2)

File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py" in inner
30. return func(*args, **kwds)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/django/contrib/admin/options.py" in changeform_view
1378. self.save_model(request, new_object, form, not add)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/csvimport/admin.py" in save_model
45. defaults=defaults)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/csvimport/management/commands/importcsv.py" in setup
176. self.csvfile = self.open_csvfile(uploaded.path, delimiter=delimiter, reader=reader)

File "/Users/kristjan/env-kliendibaas/lib/python3.5/site-packages/csvimport/parser.py" in open_csvfile
81. if endings:

Exception Type: UnboundLocalError at /admin/csvimport/csvimport/add/
Exception Value: local variable 'endings' referenced before assignment

Type Error while uploading GroupedForeignKey model

I am using django-csvimport to populate my mysql database ,but i am running into a Type Error when importing data into a GroupedForeignKey Field with following message

TypeError at /admin/csvimport/csvimport/add/

not all arguments converted during string formatting

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/csvimport/csvimport/add/

Type Error is only occurring while importing data into a field with GroupedForeignKey.

Model = GroupedForeignKey('masters.Model', "MClass")

What can be the possible solution?

Override defualt form values?

I just asked a question on stack overflow, here: https://stackoverflow.com/questions/44655073/how-to-override-model-defaults-method-of-3rd-party-installed-app-djanog

I would like to change the default text that shows up in the form in the admin area, but apparently there isn't a way to do this without copying the code and building my own app. Would this default override be something that you would consider adding to this project?

I think its a great package you have here, worked right out of the box for me. I would rather use it like this than building my own.

Overriding the default text there will help my users who are always uploading data to the same location, so if that text is filled in each time for them, all they have to do is select the CSV file.

Addition

Also this is a question if there is a way to override these defaults, either through the model or I was thinking perhaps through the ModelAdmin class in the admin.py file?

BaseCommand.option_list removed in Django 1.10

The upcoming Django 1.10 release has removed support for BaseCommand.option_list. Instead, a new add_arguments() method has been added starting in 1.8. inspectcsv and importcsv need to be adjusted to use add_arguments() where available. I can add in a version hack for Django 1.7 or support for Django 1.7 can be removed in the next release.

self.model.objects.count() throws exception on database error

import of a CSV file turned out to disrespect a NULL requirement of my model, and this fact was nicely captured in the self.loglist

[u'Columns = Identifier, lastName, firstName, ...',
'Using mapping from first row of CSV file',
'Database Error: NOT NULL constraint failed: djggApp_guest.event_id, Number: 0',
"Database Error: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block., Number: 0"]

but then trying to execute rowcount = self.model.objects.count() - rowcount (line#336) winds up throwing a much less informative exception: "TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block."

great project, happy to try to improve it!

Can't import tables with empty foreign key fields

I'm trying to import a csv file which contains a foreign key reference. In the model, the foreign key field is set to "blank=True, null=True" to make sure the reference may be empty. Now, when I import a csv file that contains only data with a FK id filled in, everything works fine. But when the csv file contains a line with an empty FK reference, I get an error: invalid literal for int() with base 10: '' (or 'NULL' if I try to insert a null value directly.) Obviously, the program is trying to assign a string to an integer field while creating the foreign key reference.

From looking at the code in csvimport.py, it seems to me that the insert_fkey function always tries to insert a reference in the "if not matches" clause, no matter if the passed value has the correct datatype. I'd suggest checking the datatypes explicitly, and if they don't match, checking whether the value passed from the csv file is either an empty string or 'NULL', and if so, simply leaving the foreign key field empty. (I've tried fixing this myself, but I can't seem to get it to work, but then I'm only a beginner with Python...)

import problem: Cannot convert float to Decimal. First convert the float to a string

hi,

i'm not sure if its a bug but i'm not able to import a csv to my deployment server - on my local installation it works fine.

i got this error: "Cannot convert float to Decimal. First convert the float to a string"
is there a possibility to see which field doesn't work?

maybe you have an idea. thanks.

model:

class Station(models.Model):

created = models.DateTimeField(_('Created'), auto_now_add=True, editable=False)
modified = models.DateTimeField(_('Modified'), auto_now=True, editable=False)
added_by = models.ForeignKey(User, verbose_name=_('Owner'), blank=True, null=True)

is_published = models.BooleanField(_('Published'), default=True)

title = models.CharField(_('Title'), max_length=50)
slug = models.SlugField(_('Slug'), unique=True)

country = models.ForeignKey(Country, verbose_name=_('Country'))

zip = models.DecimalField(_('Zip'), max_digits=6, decimal_places=0)
city = models.CharField(_('City'), max_length=50)

street = models.CharField(_('Street'), max_length=100)
house = models.CharField(_('House Number'), max_length=50)

parking = models.DecimalField(_('Number of Parking Paces'), max_digits=3, decimal_places=0, default='0')
free_parking = models.BooleanField(default=False)
renewable_energy = models.BooleanField(default=False)

OPENING_TIMES = (
    ('everytime', 'Everytime'),
    ('phone', 'Phone'),
    ('special', 'Special'),
)

opening_times = models.CharField(_('Opening Times'), max_length=20, choices=OPENING_TIMES, default='everytime')
opening_times_special = models.ForeignKey(SpecialOpeningTimes, null=True, blank=True)

ACCESS = (
    ('private', 'Private'),
    ('public', 'Public'),
)

access = models.CharField(_('Access'), max_length=50, choices=ACCESS, default='private')

description = models.TextField(blank=True, null=True)
image = models.ImageField(_('Image'), upload_to = 'uploads/images/', max_length=255, null=True, blank=True )

test csv:

created,modified,added_by_id,is_published,title,slug,country_id,zip,city,street,house,parking,free_parking,renewable_energy,opening_times,opening_times_special_id,description
2012-12-15 13:40:00,2012-12-15 13:40:00,1,TRUE,ÖAMTC Stützpunkt Brunn am Gebirge,oamtc-1-test,AT,2345,Brunn,Johann-Steinböckstraße,9,1"´,TRUE,FALSE,everytime,1,"test"

Blank Numeric Fields

If you have a numeric field (e.g. IntegerField, BigIntegerField, and FloatField) that allows for null and blank values and you upload a CSV that leaves one of those fields blank, the importer will stick an empty unicode string u'' in there. This generates various errors like these:

ValueError: invalid literal for int() with base 10: ''

and

ValueError: could not convert string to float:

Fortunately, this problem is relatively easy to fix. I put in a simple check to test which field type is being populated and don't enter a value at all if the value is blank. Also, I'm not sure what is going on with all the try/except tests. As near as I can tell row[column] never gets read after the first try, so why are we resetting it so much?

Here's my code starting on line 171 of csvimport.py:

            #if type(row[column]) == type(''):
            #    row[column] = unicode(row[column])
            field_type = model_instance._meta.get_field(field).get_internal_type()
            problem_types=['BigIntegerField','IntegerField','FloatField']
            if field_type in problem_types and not row[column]:
                # working around a bug because otherwise this thing
                # inserts u'' for an empty numeric field
                pass
            else:
                try:
                    model_instance.__setattr__(field, row[column])
                except:
                    try:
                        row[column] = model_instance.getattr(field).to_python(row[column])
                    except:
                        try:
                            row[column] = datetime(row[column])
                        except:
                            row[column] = None
                            self.loglist.append('Column %s failed' % field)

Add an optional --dialect argument to the csvimport command

Hi,

django-csvimport uses the standard python csv library at its core, this has tab delimited format handling ...

http://docs.python.org/2/library/csv.html#csv.excel_tab

... unfortunately my code doesn't pass the dialect argument to allow dynamic switching of this.

I should update it. In the mean time you just need to edit line 354 of
https://github.com/edcrewe/django-csvimport/blob/master/csvimport/management/commands/csvimport.py

to set the default dialect to csv.excel-tab from csv.excel

NB: I will add a TODO note to the repo - about having an optional dialect argument passed in.

Thanks,
Ed

On Sat, Mar 23, 2013 at 3:20 AM, Ofer [email protected] wrote:
Hello Ed.
I'm looking at your django-csvimport project on github which looks like a great piece of code.
Can you advise as to what it takes to also make it work with tab delimited files?

Thanks in advance,
Ofer

related_field removed in Django 1.9

In Django 1.9, the ForeignObject.related_field property was removed, breaking use of ForeignKey.related_field. Instead use field.related_model to access the model.

TypeError: __init__() missing 2 required positional arguments: 'app_name' and 'app_module'

Using python 3.5:

'csvimport.app.AppConfig' applied in INSTALLED_APPS

Django version 1.8.4, using settings 'AlmondKing.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/wsgiref/handlers.py", line 137, in run
    self.result = application(self.environ, self.start_response)
  File "/Users/adamstarrh/almondking/AlmondKing/lib/python3.5/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__
    return self.application(environ, start_response)
  File "/Users/adamstarrh/almondking/AlmondKing/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 170, in __call__
    self.load_middleware()
  File "/Users/adamstarrh/almondking/AlmondKing/lib/python3.5/site-packages/django/core/handlers/base.py", line 52, in load_middleware
    mw_instance = mw_class()
TypeError: __init__() missing 2 required positional arguments: 'app_name' and 'app_module'
[03/Oct/2015 23:55:45] "GET /admin HTTP/1.1" 500 59```

Cannot import empty/null DateTime fields

django: 1.5
django-csvimport: 0.9 from pypi

I get the following error upon trying to import a record which has an empty value for a field defined with models.DateTimeField(null=True, blank=True)

...
  File "C:\Python27\lib\site-packages\csvimport\management\commands\csvimport.py", line 106, in handle_label
    errors = self.run()
  File "C:\Python27\lib\site-packages\csvimport\management\commands\csvimport.py", line 274, in run
    self.model.objects.get(**matchdict)
...
ValidationError: [u"'' value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format."]

Looks like pull request #17 commit 49e2c96 by cwood might fix the problem...

AttributeError: 'module' object has no attribute 'loading' when syncdb

andrey@andrey-Lenovo-Yoga:~/repos/AmazonReg$ python manage.py syncdb
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/core/management/init.py", line 385, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/core/management/init.py", line 354, in execute
django.setup()
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/init.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python2.7/dist-packages/Django-1.7-py2.7.egg/django/apps/config.py", line 197, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/usr/local/lib/python2.7/dist-packages/django_csvimport-1.0-py2.7.egg/csvimport/models.py", line 13, in
m.name) for m in models.loading.get_models()
AttributeError: 'module' object has no attribute 'loading'

andrey@andrey-Lenovo-Yoga:~/repos/AmazonReg$ django-admin --version
1.7

django.db.models... is deprecated for django 1.8

C:\Users\PAPA\DEV\rent_unit\rent_unit_venv\lib\site-packages\csvimport\models.py:26: RemovedInDjango19Warning: django.db.models.get_models is deprecated. allmodels = models.get_models()

C:\Users\PAPA\DEV\rent_unit\rent_unit_venv\lib\site-packages\django\db\models_init_.py:55:
RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system. from . import loading

C:\Users\PAPA\DEV\rent_unit\rent_unit_venv\lib\site-packages\csvimport\models.py:26:
RemovedInDjango19Warning: django.db.models.get_models is deprecated. allmodels = models.get_models()

C:\Users\PAPA\DEV\rent_unit\rent_unit_venv\lib\site-packages\django\db\models_init_.py:55:
RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system. from . import loading

django.db.utils.ProgrammingError: syntax error at or near "csvtests_country"

scratch_8.txt

Very simple Django project. My import of data works perfectly fine, however whenever I have the 'csvimport.app.CSVImportConf', enabled in settings.py, I get the attached message when I do migrate.

It's not really causing me a problem per se, as the data DOES import. However it is annoying have errors blasting at me every time I try and migrate my django project.

Not Showing up in Admin

I followed all of the steps, but I'm not sure what I'm supposed to do for the instructions below. Do I need to add something to my admin file?

Admin interface import

Just add a csvimport item, fill in the form and submit.
Failed import rows are added to the log field.

command line error

Hi,

I get the attached error after every import. Even if the import is successful from the command line

Notes:

  1. It seem to input False for a boolean field you need to leave this field empty. A zero does not work.

  2. Also you cannot enter a blank value for a PositiveSmallIntegerField, it has to be a zero.

Tessa

Tessa Alexander

Traceback (most recent call last):
File "./django-admin.py", line 6, in
management.execute_from_command_line()
File "/usr/local/projects/dbms/lib/cmtsa/beta/lib/python2.6/site-packages/django/core/management/init.py", line 429, in execute_from_command_line
utility.execute()
File "/usr/local/projects/dbms/lib/cmtsa/beta/lib/python2.6/site-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/projects/dbms/lib/cmtsa/beta/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/local/projects/dbms/lib/cmtsa/beta/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/usr/local/projects/dbms/lib/cmtsa/beta/lib/python2.6/site-packages/django/core/management/base.py", line 322, in handle
label_output = self.handle_label(label, **options)
File "/usr/local/projects/dbms/lib/cmtsa/beta/src/django-csvimport/csvimport/management/commands/csvimport.py", line 73, in handle_label
save_csvimport(self.props)
File "/usr/local/projects/dbms/lib/cmtsa/beta/src/django-csvimport/csvimport/management/commands/csvimport.py", line 20, in save_csvimport
from csvimport.models import CSVImport

Provide example for including in admin?

I'm attempting to use this in admin but suppose I need a bit more direction than the instructions here provide. Is there a project up that I can look at as an example?

SyntaxError: invalid syntax during install

python3/3.4.1

pip install django-csvimport

Downloading/unpacking django-csvimport
Downloading django-csvimport-1.0.tar.gz
Running setup.py (path:/work/users/pip_build_root/django-csvimport/setup.py) egg_info for package django-csvimport

warning: no previously-included files matching '*pyc' found anywhere in distribution

Downloading/unpacking chardet (from django-csvimport)
Downloading chardet-2.2.1-py2.py3-none-any.whl (180kB): 180kB downloaded
Downloading/unpacking django-appconf>=0.5 (from django-csvimport)
Downloading django_appconf-0.6-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): django>=1.4 in /mnt/various/local/genome/packages/python3/3.4.1/lib/python3.4/site-packages (from django-csvimport)
Downloading/unpacking six (from django-appconf>=0.5->django-csvimport)
Downloading six-1.8.0-py2.py3-none-any.whl
Installing collected packages: django-csvimport, chardet, django-appconf, six
Running setup.py install for django-csvimport

warning: no previously-included files matching '*pyc' found anywhere in distribution
  File "/local/genome/packages/python3/3.4.1/lib/python3.4/site-packages/csvimport/tests/log_tests.py", line 18
    print '''CSVIMPORT_LOG is not set to 'logger' in settings
                     - assume not using csvimport.tests.settings
                     - so cannot test the log'''


                                               ^
SyntaxError: invalid syntax

  File "/local/genome/packages/python3/3.4.1/lib/python3.4/site-packages/csvimport/tests/parse_tests.py", line 52
    print err
            ^
SyntaxError: invalid syntax

  File "/local/genome/packages/python3/3.4.1/lib/python3.4/site-packages/csvimport/management/commands/csvimport.py", line 44
    print 'Assumed charset = %s\n' % instance.charset
                                 ^
SyntaxError: invalid syntax

Successfully installed django-csvimport chardet django-appconf six
Cleaning up...

Need more than 1 value to unpack error

Receiving following error when trying to import a CSV:

 ValueError at /admin/csvimport/csvimport/add/
 need more than 1 value to unpack
 Request Method:    POST
 Request URL:   http://mysite.com:8000/admin/csvimport/csvimport/add/
 Django Version:    1.5.4
 Exception Type:    ValueError
 Exception Value:   
 need more than 1 value to unpack
 Exception Location:    /projects/lib/python2.7/site-packages/csvimport/management/commands/csvimport.py in run, line 294

Received a better description of the error by modifying csvimport.py:

 except DatabaseError, err:

      from pprint import pprint
      pprint(model_instance.__dict__)             

      error_number, error_message = err

Error uploading file

When trying to import a CSV file and after click on save.i got an error. (I am using sqllite database)

Any help please?

Request Method:
POST

Request URL:
http://127.0.0.1:8000/admin/csvimport/csvimport/add/

Django Version:
1.8.3

Exception Type:
TransactionManagementError

Exception Value:
An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.

Exception Location:
C:\Python33\lib\site-packages\django-1.8.3-py3.3.egg\django\db\backends\base\base.py in validate_no_broken_transaction, line 327

Python Executable:
C:\Python33\python.exe

Python Version:
3.3.5

No GET data

POST

Variable

Value

csrfmiddlewaretoken 'By10k4mnlFE6vHNsMeeMgciAger46Lt6'

model_name 'polls.Question'

_save 'Save'

field_list 'column1=Question text,column2=Date_published'

encoding ''

FILES

Variable

Value

upload_file <InMemoryUploadedFile: test.csv (application/vnd.ms-excel)>

COOKIES

Variable

Value

sessionid '53pqt8vra8nmyx9mulzwkulpwro43gt3'

csrftoken 'By10k4mnlFE6vHNsMeeMgciAger46Lt6'

File not found

Setup:
Django 1.7.6
django-csvimport 2.4
Ubuntu 14.04

Command python manage.py csvimport file.csv, results in the error message:
`File file.csv not found.``
Tried using absolute and relative paths to the same effect.

Rows not imported still increment primary key

I'm not sure why but rows that can't be imported still increment the primary key of a database. So importing a file with 50k records where 20k where not importable, would have primary keys from 1-50k.

csv.reader - set optional delimiter (e.g. semicolon)

CSV files are delimited either by comma or by semicolon.

Please, provide the option to set semicolon delimiter.

I had to fix manually the file cvsimport.py line 379:

     csv_reader = csv.reader(self.charset_encoder(csv_data, charset),
                            dialect=dialect, delimiter=";", **kwargs)  

Add support for migrate command

Please add support for migrate -command. syncdb is not working in Dango 1.9

ProgrammingError at /admin/csvimport/csvimport/add/
relation "csvimport_csvimport" does not exist
LINE 1: INSERT INTO "csvimport_csvimport" ("model_name", "field_list...
                    ^
Request Method: POST
Request URL:    .../csvimport/csvimport/add/
Django Version: 1.9.5
Exception Type: ProgrammingError
Exception Value:    
relation "csvimport_csvimport" does not exist
LINE 1: INSERT INTO "csvimport_csvimport" ("model_name", "field_list...
                    ^
Exception Location: /usr/local/lib/python2.7/dist-packages/Django-1.9.5-py2.7.egg/django/db/backends/utils.py in execute, line 64
Python Executable:  /usr/bin/python
Python Version: 2.7.6
 '/usr/local/lib/python2.7/dist-packages/Django-1.9.5-py2.7.egg',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages']

Python 3.4 chardet ImportError: No module named 'universaldetector'

Thanks for the awesome django app.

I may be missing something here:

(django_env) bob@bob-NE722:~/django_mysql_test/mysql_connector$ pip3 show django-csvimport

---
Name: django-csvimport
Version: 2.4
Location: /home/bob/django_mysql_test/django_env/lib/python3.4/site-packages
Requires: django, chardet
Location: /home/bob/django_mysql_test/django_env/lib/python3.4/site-packages
Requires: django, chardet
(django_env) bob@bob-NE722:~/django_mysql_test/mysql_connector$ pip3 show chardet

---
Name: chardet
Version: 2.1.1
Location: /home/bob/django_mysql_test/django_env/lib/python3.4/site-packages
Requires: 
(django_env) bob@bob-NE722:~/django_mysql_test/mysql_connector$ pip3 show django

---
Name: Django
Version: 1.7.1
Location: /home/bob/django_mysql_test/django_env/lib/python3.4/site-packages
Requires: 

However:

(django_env) bob@bob-NE722:~/django_mysql_test/mysql_connector$ python3 manage.py importcsv /home/bob/Documents/SGIS-wxpython/spreadsheets/MEE_Test/MEE_Test.csv > test_model.py
Traceback (most recent call last):
  File "manage.py", line 9, in <module>
    execute_from_command_line(sys.argv)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/django/core/management/base.py", line 503, in handle
    label_output = self.handle_label(label, **options)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/csvimport/management/commands/importcsv.py", line 127, in handle_label
    warn = self.setup(mappings, modelname, charset, filename, defaults)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/csvimport/management/commands/importcsv.py", line 156, in setup
    failed = self.check_filesystem(csvfile)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/csvimport/parser.py", line 185, in check_filesystem
    self.csvfile = self.open_csvfile(csvfile)
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/csvimport/parser.py", line 44, in open_csvfile
    diagnose = chardet.detect(self.filehandle.read())
  File "/home/bob/django_mysql_test/django_env/lib/python3.4/site-packages/chardet/__init__.py", line 21, in detect
    import universaldetector
ImportError: No module named 'universaldetector'

I had to download chardet from: https://pypi.python.org/pypi/chardet2/2.0.3
Which is written to support python3?

It seems to run without issue after I extracted the files and moved them into the chardet directory in my virtualenv.

It also seems to work if I pip3 uninstall chardet and instead pip3 install chardet2

Thoughts? Am I doing it wrong? Or did something change?

Again, Thanks.

notes:

I had to do some digging and found that chardet had some syntax issues in python3.

Such as:

bob@bob-NE722:~/Documents/SGIS-wxpython/spreadsheets/MEE_Test$ python3 /usr/local/lib/python3.4/dist-packages/chardet/universaldetector.py
File "/usr/local/lib/python3.4/dist-packages/chardet/universaldetector.py", line 54
    self.done = constants.False

And then ran into this excellent article: http://docs.activestate.com/activepython/3.2/diveintopython3/html/case-study-porting-chardet-to-python-3.html

Which basically outlines everything I was having a problem with in regards to chardet

(django_env) bob@bob-NE722:~/django_mysql_test/mysql_connector$ pip3 show chardet2

---
Name: chardet2
Version: 2.0.3
Location: /home/bob/django_mysql_test/django_env/lib/python3.4/site-packages
Requires: 

Attribute error when uploading csv

Dear,

I am trying to get the csvimport app working, but have not managed yet. This is the error I get when saving in the admin screen, specifying the model and leaving the mapping empty (first line in the csv are the names of the attributes).

Thanks for any help!

AttributeError at /admin/csvimport/csvimport/7/

'list' object has no attribute 'replace'

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/csvimport/csvimport/7/
Django Version: 1.3
Exception Type: AttributeError
Exception Value:

'list' object has no attribute 'replace'

Exception Location: /usr/local/lib/python2.7/dist-packages/django_csvimport-0.2-py2.7.egg/csvimport/management/commands/csvimport.py in __mappings, line 304
Python Executable: /usr/bin/python
Python Version: 2.7.1

'Unrecognized arguments' on Python 3.5.2 and Django 1.10

I get the error unrecognized arguments and mappings doesnt seem to be a valid option in the usage list. Am I missing something?

python manage.py importcsv --mappings=’column1=name,column2=some_id,column3=something_else’ --model='peoplelisting.People' --delimiter=',' All_copy.csv
usage: manage.py importcsv [-h] [--version] [-v {0,1,2,3}]
                           [--settings SETTINGS] [--pythonpath PYTHONPATH]
                           [--traceback] [--no-color]
                           label [label ...]
manage.py importcsv: error: unrecognized arguments: --mappings=’column1=name,column2=some_id,column3=something_else’ --model='peoplelisting.People' --delimiter=',

Thanks in advance
Anupam

csvimport not Django 1.7 compatible

When I add csvimport as an installed app (while using Django 1.7) I get the following message:

Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    main()
  File "manage.py", line 14, in main
    execute_from_command_line(sys.argv)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 50, in run_from_argv
    super(Command, self).run_from_argv(argv)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/commands/test.py", line 71, in execute
    super(Command, self).execute(*args, **options)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django_jenkins/management/commands/jenkins.py", line 105, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/test/runner.py", line 147, in run_tests
    old_config = self.setup_databases()
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django_jenkins/runner.py", line 127, in setup_databases
    return super(CITestSuiteRunner, self).setup_databases()
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/test/runner.py", line 109, in setup_databases
    return setup_databases(self.verbosity, self.interactive, **kwargs)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/test/runner.py", line 299, in setup_databases
    serialize=connection.settings_dict.get("TEST_SERIALIZE", True),
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/db/backends/creation.py", line 374, in create_test_db
    test_flush=True,
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 115, in call_command
    return klass.execute(*args, **defaults)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 52, in handle
    import_module('.management', app_config.name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/home/fahammed/venv/local/lib/python2.7/site-packages/csvimport/management/__init__.py", line 1, in <module>
    from django.core.management import _commands, get_commands 
ImportError: cannot import name _commands

It seems the code in csvimport/management/__init__.py is not required anymore. I get it to work fine when I comment out all the lines in that file.

Several import issues

I've run into several problems actually.
I'm using Django 1.7.2 and python3.4.
If there is a header line in the csv file, it will not import either from the commandline or in the Admin. Unless I add mappings to the Admin import, it will not import. With the mappings added, it will only import the first line.
From the commandline, when adding the mappings to the import command it imports the first line, but then seems to go into an infinite loop.

Not sure what's happening here. Any suggestions are appreciated.

Update: forgot to mention I am using commit 464ab20 of django-csvimport

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.